XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I can't answer your questions, but I would expect that the compiler/interpreter is free to destroy any object that isn't used anymore.
If you use the variable $foo in the END block, it's only destroyed afterwards. Since lexical variables are only accessible from their scope, it's much easier for the compiler to proof that they aren't used from somewhere else anymore. our variables could still be referenced from END blocks in other packages. BTW perlobj says Since DESTROY methods can be called at unpredictable times, it is important that you localise any global variables that the method may update. That's a pretty bold statement that should shouldn't rely on any particular order. In reply to Re: Global destruction feature / bug ?
by moritz
|
|