Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Passing parameters to object method references

by borisz (Canon)
on Jun 21, 2007 at 10:44 UTC ( #622531=note: print w/ replies, xml ) Need Help??


in reply to Passing parameters to object method references

pass the parameter's to your dispatch

sub subref { my $self = shift; return { order => ['A', 'B'], dispatch => { A => sub { $self->suba(@_) }, B => sub { $self->subb }, } }; }
Boris


Comment on Re: Passing parameters to object method references
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://622531]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2015-07-29 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (267 votes), past polls