in reply to Re^4: is there a way to ensure some code is the last thing that is run?
in thread is there a way to ensure some code is the last thing that is run?
here the demo:
package Blubb; + sub new { my $this = bless {}; # $this->{circular} = $this; } sub DESTROY { warn "DESTROY\n"; } package MAIN; #{ my $b = Blubb->new; #} END { warn "END\n"; }
DESTROY END
What's surprising me is that it already works without curlies. I expected the variable to be accessible in END, like in BEGIN.
Hauke, I'm sure you want to try this out! ;-)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: is there a way to ensure some code is the last thing that is run?
by ikegami (Patriarch) on Feb 03, 2017 at 18:25 UTC | |
|
Re^6: is there a way to ensure some code is the last thing that is run?
by haukex (Archbishop) on Feb 03, 2017 at 10:53 UTC | |
by ikegami (Patriarch) on Feb 03, 2017 at 18:31 UTC | |
by haukex (Archbishop) on Feb 03, 2017 at 18:40 UTC | |
|
Re^6: is there a way to ensure some code is the last thing that is run?
by LanX (Saint) on Feb 03, 2017 at 10:29 UTC |