in reply to Re^2: Variable Name Mistery. Who calls?
in thread Variable Name Mistery. Who calls?
I assume $param and $_param were supposed to be the same. That's a little obfuscated, and doesn't allow setting parameters to false values. A more typical way to do it is:my $param = shift; ... $self->{$_call} = $_param || return $self->{$_call};
# (after shifting everything but param) if (@_) { return $self->{$_call} = shift; } else { return $self->{$_call}; }
|
|---|