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

Re: Determination of a subs' invocation from within the sub

by kennethk (Monsignor)
on Mar 12, 2014 at 17:37 UTC ( #1078058=note: print w/ replies, xml ) Need Help??


in reply to Determination of a subs' invocation from within the sub [RESOLVED]

Not to be flippant, but this smacks of an XY Problem, or at least unnecessarily high levels of cleverness. Why would you need to tell the difference?

Assuming you have a Good Reason™, one difference is prototype checking. From perlsub:

Not only does the & form make the argument list optional, it also disables any prototype checking on arguments you do provide. This is partly for historical reasons, and partly for having a convenient way to cheat if you know what you're doing. See Prototypes below.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: Determination of a subs' invocation from within the sub

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2014-07-25 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (174 votes), past polls