produces:package Blubb; + sub new { my $this = bless {}; $this->{circular} = $this; } sub DESTROY { print "DESTROY\n"; } package MAIN; my $b = Blubb->new; END { print "END\n"; }
Now assume you have some code that someone else has written and where destructors run as above during gobal destruction and one of them (you are too lazy to figure out which) is doing something nasty.END DESTROY
Would it be (as a hack of course) then possible to graft something on to ensure that the nasty thing is undone as the last thing that happens?
My understanding is that during global destruction all bets are off and so I guess it is not possible, but then what do I know...
In reply to Re^2: is there a way to ensure some code is the last thing that is run?
by morgon
in thread is there a way to ensure some code is the last thing that is run?
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |