if (@_) { \$self->{$_} = shift; }
Arrays get interpolated too, so I think the code above – and likewise in OPed code – should be (note \@_ vice @_):
if (\@_) { \$self->{$_} = shift; }
In reply to Re^2: How do I get to this 'simple' helper?
by AnomalousMonk
in thread How do I get to this 'simple' helper?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |