powerman has asked for the wisdom of the Perl Monks concerning the following question:
use more complex:eval { local $SIG{ALRM} = sub {die "alarm here"}; alarm(5); long_code(); alarm(0); }
I 100% agree with need of second internal eval if long_code can call die(). But I also have two questions:eval { local $SIG{ALRM} = sub {die "alarm here"}; alarm(5); eval { long_code(); }; alarm(0); # see QUESTION 2 below } alarm(0); # see QUESTION 1 below die if $@ && $@ !~ /alarm here/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: second alarm(0)
by tlm (Prior) on Apr 30, 2005 at 15:26 UTC | |
by powerman (Friar) on Apr 30, 2005 at 15:51 UTC | |
by powerman (Friar) on Apr 30, 2005 at 15:41 UTC | |
by tlm (Prior) on Apr 30, 2005 at 16:06 UTC |