Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 musing on the Monastery: (9)
As of 2014-12-28 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls