Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Invoking a method whose name is computed

by tobyink (Abbot)
on Oct 02, 2012 at 16:30 UTC ( #996881=note: print w/ replies, xml ) Need Help??


in reply to Re: Invoking a method whose name is computed
in thread Invoking a method whose name is computed

A pretty good solution, but doesn't work for autoloaded methods unless the developer has been conscientious and overloaded can correctly.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^2: Invoking a method whose name is computed
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-09-30 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (386 votes), past polls