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

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

by lachoy (Parson)
on Feb 25, 2002 at 13:49 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://147329]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found