in reply to Re: Re: Weirdness with $SIG{__DIE__} (and __WARN__)
in thread Weirdness with $SIG{__DIE__} (and __WARN__)

Some consider $SIG{__DIE__} to be broken in design. Certainly, if you want nested 'die catchers' I think you would be better off using eval than $SIG{__DIE__}.

The p5p e-mail list archives have several discussions regarding this.

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re: Weirdness with $SIG{__DIE__} (and __WARN__)

Replies are listed 'Best First'.
Re: (tye)Re: Weirdness with $SIG{__DIE__} (and __WARN__)
by autarch (Hermit) on Jan 13, 2001 at 13:58 UTC

    Yes, this 'brokenness' is what this code is intended to address.

    This is entirely orthogonal to the use of eval. $SIG{__DIE__} is still useful if you want to convert Perl's run time error deaths into a specific exception object or something.

    -dave