Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Class method names in a scalar variable

by LanX (Canon)
on Dec 23, 2013 at 15:19 UTC ( #1068200=note: print w/ replies, xml ) Need Help??


in reply to Class method names in a scalar variable

yes, just wrong syntax:

try $self->$method();

->Methods are always just strings which are messaged to the class to seek the appropriate sub.

Cheers Rolf

( addicted to the Perl Programming Language)


Comment on Re: Class method names in a scalar variable
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-01-25 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (182 votes), past polls