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

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
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?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-11-27 07:43 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (719 votes), past polls