Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Class method names in a scalar variable

by LanX (Chancellor)
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)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1068200]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2016-12-10 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (164 votes). Check out past polls.