in reply to cleaning up an indirect

Here's a little syntactic sugar to ease the pain:
sub foo { my ($self, $arg) = @_; &{ $self->{'foo_code'} }; }
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.)