Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by kennethk (Abbot)
on Mar 12, 2014 at 17:37 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1078058]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-24 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found