It's still indirect, but as long as you don't shift things out of @_, you don't have to pass $self explicitly. (I can't think of a way to do it otherwise, without actually installing the subroutine in a typeglob in your package somewhere.)sub foo { my ($self, $arg) = @_; &{ $self->{'foo_code'} }; }
In reply to Re: cleaning up an indirect
by chromatic
in thread cleaning up an indirect
by knight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |