Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: dynamic perl calls

by TGI (Vicar)
on Feb 10, 2009 at 19:57 UTC ( #742867=note: print w/ replies, xml ) Need Help??


in reply to Re: dynamic perl calls
in thread dynamic perl calls

Method calls are not subject to strict subs. So you can do:

use strict; use warnings; my $sub = 'foo'; my @result_set = Dispatch->$sub( qw/bar baz/ ); package Dispatch; sub foo { shift; print @_,"\n"; }


TGI says moo


Comment on Re^2: dynamic perl calls
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2015-07-28 20:27 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 (258 votes), past polls