in reply to Using $variable in place of "Method" in Module::Submodule::Method( @args )
Seems like a good place to use can e.g
use Carp 'croak'; sub pass_thru { my($self, $method, @args) = @_; my $func = $self->can($method); croak "No such function '$method' in ".(ref $self || $self) unless $func; return $func->(@args); }
HTH
_________
broquaint
|
---|
In Section
Seekers of Perl Wisdom