Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
XP is just a number
 
PerlMonks  

Re: Calls the caller's method

by tobyink (Abbot)
on Jul 10, 2012 at 16:16 UTC ( #980896=note: print w/ replies, xml ) Need Help??


in reply to Calls the caller's method

If you're calling a function as a method (i.e. with ->) or calling it using a fully-qualified name (e.g. Scalar::Util::blessed()), then you do not need to use the module in question - all that is important is that it's been loaded (i.e. use, require or do) somewhere in this process. (And your caller has always been at least partially loaded before you were.)

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


Comment on Re: Calls the caller's method
Select or Download Code
Re^2: Calls the caller's method
by anazawa (Beadle) on Jul 10, 2012 at 17:48 UTC
    Thank for your suggestion. I totally agree with you. I was blind to this issue :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2014-04-18 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (468 votes), past polls