Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Let a module call a sub of the caller

by tobyink (Abbot)
on Sep 07, 2012 at 12:38 UTC ( #992303=note: print w/ replies, xml ) Need Help??


in reply to Let a module call a sub of the caller

B::Hooks::EndOfScope or perhaps Hook::AfterRuntime (or even a combination of the two) ought to do the trick.

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


Comment on Re: Let a module call a sub of the caller

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-05-25 00:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (476 votes), past polls