in reply to Global destruction feature / bug ?
To me, this behaviour makes sense because my $foo gets reclaimed as soon as the current scope is left (main::). After the main program has ended, the END blocks fire, and after that, all global variables get cleaned up.
Except (as I just realize) that our is not supposed to be a global(ly visible) variable and hence should be reclaimed at the same time as my $foo, that is, in my opinion before the END blocks are run.
One more reason to avoid our IMO.
Update: My opinion on the order of things is wrong - the order of execution/destruction of objects is exactly as it has to be because the our variable is a global variable except that the name is not visible outside the file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Global destruction feature / bug ?
by Fletch (Bishop) on Apr 03, 2008 at 14:15 UTC | |
|
Re^2: Global destruction feature / bug ?
by lodin (Hermit) on Apr 03, 2008 at 14:24 UTC | |
|
Re^2: Global destruction feature / bug ?
by jettero (Monsignor) on Apr 03, 2008 at 14:15 UTC | |
by Corion (Patriarch) on Apr 03, 2008 at 14:24 UTC | |
by jettero (Monsignor) on Apr 03, 2008 at 14:33 UTC |