in reply to cleaning up an indirect
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'} }; }
|
|---|