Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Using $variable in place of "Method" in Module::Submodule::Method( @args )

by broquaint (Abbot)
on Aug 24, 2006 at 14:53 UTC ( #569379=note: print w/replies, xml ) Need Help??


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

  • Comment on Re: Using $variable in place of "Method" in Module::Submodule::Method( @args )
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://569379]
help
Chatterbox?
[Corion]: Heh. The JSON link for Strawberry releases gives me the idea that I should provide an RSS proxy so people can get notified when a new release is there...
[Corion]: In other RSS news, I've updated my photo stream with images from Lanzarote
[choroba]: Corion Nice
[Corion]: Hi choroba! I'm somewhat fond of this picture - I think it is Breaking Bad-style even though I haven't watched the series at all ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-02-27 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (377 votes). Check out past polls.