updated to shift off self. thanks, Moronsub foo { my $self = shift; # oops, forgot this line before if (@_) { $self->{foo} = shift; return $self; } return $self->{foo}; }
In reply to Re: Method Chaining and Accessors
by mreece
in thread Method Chaining and Accessors
by linenoise
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |