Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Beware of global variables, for they may prevent your destruction.

by tilly (Archbishop)
on Nov 29, 2009 at 23:38 UTC ( #810042=note: print w/ replies, xml ) Need Help??


in reply to Re: Beware of global variables, for they may prevent your destruction.
in thread Beware of global variables, for they may prevent your destruction.

However destructors run at program termination often find that data they expected to have still around is not there. Such as data inside of the object you are destroying

Therefore it is safer to deallocate globals in END blocks. That way you can control what is there. But be careful not to do anything that messes up $!, else exit may not work as expected.


Comment on Re^2: Beware of global variables, for they may prevent your destruction.
Reaped: Re^3: Beware of global variables, for they may prevent your destruction.
by NodeReaper (Curate) on Dec 01, 2009 at 11:41 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-07-24 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (159 votes), past polls