Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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'

Replies are listed 'Best First'.
Re^2: Calls the caller's method
by anazawa (Scribe) 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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-12-07 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (133 votes). Check out past polls.