Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Adding autoloaded methods to symbol table with using strict refs

by lachoy (Parson)
on Feb 25, 2002 at 13:49 UTC ( #147329=note: print w/replies, xml ) Need Help??


in reply to Adding autoloaded methods to symbol table with using strict refs

I don't think you can do that. But IMO you don't need to worry about it -- turning off a feature like this is fine, as long as you know what you're doing and the effects are limited.

Note that you don't need the use strict 'refs' after you assign the sub, since the no strict 'refs' only applies until the block ends. This is why many times you'll see something like:

...normal code here... { no strict 'refs'; ... do fun things with the symbol table ... } ...continue normal code...

So the effects of no strict 'refs' are limited to its immediate block.

Chris
M-x auto-bs-mode

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://147329]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-06-27 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (597 votes). Check out past polls.