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

Re: AUTOLOAD, overload, and Roman numerals for Perl

by ikegami (Pope)
on Jun 29, 2007 at 15:59 UTC ( #624112=note: print w/replies, xml ) Need Help??

in reply to AUTOLOAD, overload, and Roman numerals for Perl

Barewords are autoquoted (BAREWORD -> 'BAREWORD'), except in two situations.
1) If a function was already declared with that name, it will be treated as a function name.
2) If a glob is expected (such as print's first argument), then it will be treated as a glob (BAREWORD -> *BAREWORD).

A bareword is only treated as a function name when a function with that name has already been declared, so AUTOLOAD won't work. Autoquoting of barewords can't be overriden by overload, so overload won't help. Looks to me like you're stuck using &I/I() or a source filter.

Note: use strict will generate an error when bareword autoquoting occurs outside of a hash index.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2021-04-18 20:57 GMT
Find Nodes?
    Voting Booth?

    No recent polls found