Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Re: Protect your subs... from *EVIL*.

by diotalevi (Canon)
on Dec 22, 2003 at 20:51 UTC ( [id://316478]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Protect your subs... from *EVIL*.
in thread Protect your subs... from *EVIL*.

That's not quite right, globals are still globals even after Sub::Sealed because you only fixup the function's lexicals. In fact, even your lexicals are now globals after being sealed. So this effectively removes lexicals from your function and sneakily replaces them with globals.

Replies are listed 'Best First'.
Re: Re: Re: Re: Protect your subs... from *EVIL*.
by jryan (Vicar) on Dec 22, 2003 at 21:13 UTC

    Not quite right; it seals any variable used within the sub that was declared outside of the sub (or at least, that's what it is supposed to do.). However, you are right in that part of this process involves turning these variables into globals, whether they were before or not. However, they are SECRET globals! Secret! Only ninjas can find them! :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found