Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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?

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 lurking in the Monastery: (9)
As of 2016-10-25 11:55 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (317 votes). Check out past polls.