Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Parsing barewords as sub/method calls? (workaround)

by Eily (Priest)
on Nov 23, 2013 at 17:21 UTC ( #1064052=note: print w/replies, xml ) Need Help??


in reply to Re: Parsing barewords as sub/method calls? (workaround)
in thread Parsing barewords as sub/method calls?

&BLA; is actually equivalent to BLA(@_);. This works in your case because @_ is empty, but if you use this syntax within a sub, you'll forward its arguments.

use feature 'say'; @_ = qw/4 5 6/; our $AUTOLOAD; sub AUTOLOAD { say "Autoload called as $AUTOLOAD(@_)" } BLA(1,2,3); &BLA; __END__ Autoload called as main::BLA(1 2 3) Autoload called as main::BLA(4 5 6)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2016-09-28 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (533 votes). Check out past polls.