You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Perl module that defines a class with a bunch of methods. These are shown nicely and correctly in the Code Browser sidebar. However, for some reason, sometimes a local variable is interpreted by the Code Browser as if it were global and shown that way.
E.g.: I defined these 3 functions (one after the other as they are included down below). As you can see they only use local variables. However in the Code Browser - for some reason - $me and $cmd are shown on the top level - as if they were globals (see attached image).
This was the case in Komodo 8.5 and is still there in the latest version version 9.2.1, build 87651.
subwriteWord { # (addr, data): write a data word to DP2x memorymy ($self, $addr, $data, %args) = @_;
my$me = (caller(0))[3];
$self->_setErr("ERROR: $me(): at least one required parameter is missing."), returnundefunless (defined$addr) and (defined$data);
my$adr = $self->_int2Arg($addr);
my$dat = $self->_int2Arg($data);
returnundefunless (defined($adr) anddefined($dat));
if (defined$args{-port}) {
if ($args{-port} eq"dp2x") {
my$resp = $self->_memWriteWord($adr,$dat);
$resp = $self->_retry($me, sub { $self->_memWriteWord(@_) }, ($adr, $dat)) unlessdefined$resp;
return$resp;
} else {
$addr &= 0x000F;
$addr |= 0x0010; # user only needs to specify addresses from 0..15 -> chip select bit (bit 4) is added herereturn$self->_spiWriteWord($addr, $data, "spi", %args); # branch to "spi" port version
}
}
$me = $self->_getBaseName($me);
$self->_setErr("ERROR ($self->{whatami}): Port 'native' has no function '$me'.");
returnundef;
}
subwriteWords { # (addr, buffer): write a buffer to DP2x memory, starting at the specified addressmy ($self, $addr, $bufRef, %args) = @_;
my$me = (caller(0))[3];
$self->_setErr("ERROR: $me(): at least one required parameter is missing."), returnundefunless (defined$addr) and (defined$bufRef);
my$adr = $self->_int2Arg($addr);
returnundefunlessdefined($adr);
$self->_setErr("ERROR: $me(): expecting an ARRAY reference for the second parameter"), returnundefunless (ref$bufRefeq"ARRAY");
my$cmd = "CMD10".$self->_int2Arg(1); # select firmware bufferreturnundefunless$self->_sendRawCmd($cmd);
my$crc = $self->_calcDp2xCRC($bufRef);
$cmd = "CMD1E".$adr.$self->_int2Arg(2*scalar(@{$bufRef})).$self->_int2Arg($crc); # send write buffer command - length is in bytes, data comes in wordsreturnundefunless$self->_sendRawCmd($cmd);
returnundefunless$self->send_word_buffer($bufRef); # send the data (function inherited from RpcDevice)# write buffer to the chip (retry in case of errors (which is not unlikely for any UART transfers))$cmd = "CMD0A"; # write buffer to chipmy$state = $self->_sendRawCmd($cmd);
$state = $self->_retry($me, sub { $self->_sendRawCmd(@_); }, $cmd) unlessdefined$state;
return$stateunless (defined$state) && ($args{-burn}==1);
# now burn the data to the OTP$cmd = "CMD0E";
return$self->_sendRawCmd($cmd);
}
subwriteDmem { # (sel, data): write selected DMEM locationmy ($self, $sel, $data, %args) = @_;
my$me = (caller(0))[3];
$self->_setErr("ERROR: $me(): command not supported in FW1.x - use writeWord instead!"), returnundefif ($self->{realFwVersion}<2); # could be mapped here, but I'm too lazy$self->_setErr("ERROR: $me(): at least one required parameter is missing."), returnundefunless (defined$sel) and (defined$data);
my$adr = $self->_int2Arg($sel);
my$dat = $self->_int2Arg($data);
returnundefunless (defined($adr) anddefined($dat));
my$cmd = "CMD6B".$adr.$dat;
my$resp = $self->_sendRawCmd($cmd);
$resp = $self->_retry($me, sub { $self->_sendRawCmd(@_) }, $cmd) unlessdefined$resp;
return$resp;
}
The text was updated successfully, but these errors were encountered:
I've heard about a new fish restaurant opening next saturday, are you planning to go there? Here is some info about that http://advantage.seanscarmardo.com/e4ymt
I have a Perl module that defines a class with a bunch of methods. These are shown nicely and correctly in the Code Browser sidebar. However, for some reason, sometimes a local variable is interpreted by the Code Browser as if it were global and shown that way.
E.g.: I defined these 3 functions (one after the other as they are included down below). As you can see they only use local variables. However in the Code Browser - for some reason - $me and $cmd are shown on the top level - as if they were globals (see attached image).
This was the case in Komodo 8.5 and is still there in the latest version version 9.2.1, build 87651.
The text was updated successfully, but these errors were encountered: