in reply to Re: Timer::Runtime proposed
in thread Timer::Runtime proposed

What if in the START block I started a OO timer and then in it's destroy method, calculated the stop time and printed it?

I think that would get around the END problems.

Replies are listed 'Best First'.
Re^3: Timer::Runtime proposed
by JavaFan (Canon) on Mar 29, 2011 at 09:07 UTC
    Did you try whether it works? Seems easier than asking here whether it does.
    $ perl -wE 'sub DESTROY {say "ping"} my $x = bless [];' ping $ perl -wE 'sub DESTROY {say "ping"} my $x = bless []; exec "echo"' $
    Alternatively, one could have consulted the manual page:
    Note that "exec" will not call your "END" blocks, nor will it invoke "DESTROY" methods on your objects.
Re^3: Timer::Runtime proposed
by Anonymous Monk on Mar 29, 2011 at 08:29 UTC