in reply to Re^2: 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?

If all you are after doing it avoiding global cleanup, you could do:

package Blubb; sub new { my $this = bless {}; $this->{circular} = $this; } sub DESTROY { print "DESTROY\n"; } package MAIN; use POSIX (); my $b = Blubb->new; POSIX::_exit(0);

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: is there a way to ensure some code is the last thing that is run?
  • Download Code

Replies are listed 'Best First'.
Re^4: is there a way to ensure some code is the last thing that is run?
by morgon (Priest) on Feb 03, 2017 at 15:06 UTC
    Good idea, many thanks.

    POSIX::_exit may indeed be all I need for my particular hack.