in reply to Re: why did i die?
in thread why did i die?

That's not a generic solution. The code I run in the eval can be everything Perl has to offer... for instance runtime requiring any module on CPAN.

Replies are listed 'Best First'.
Re^3: why did i die?
by LanX (Saint) on Apr 02, 2014 at 11:42 UTC

    Another option I see¹ is to inspect the source-code.

    Every internal error-msg comes with parsable file and line infos. You could try to match for "die" there.

    Saying this I have to tell you that file and line infos can be manipulated.

    OTOH combining all shown approaches should make it rather difficult to fool your monitoring solution.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

    ¹) beside hacking CORE::die  with XS (which of course can be sabotaged by modules hacking CORE::die  ...)

Re^3: why did i die?
by LanX (Saint) on Apr 02, 2014 at 10:52 UTC
    So what?

    You have to realize that you won't be able to find a pure Perl solution which can't be sabotaged by evaled pure Perl.

    Cheers Rolf

    ( addicted to the Perl Programming Language)