Expanding on what the anony monk said, your die handler can test if the die happened in an eval.
So, maybe the following:
# not tested sub SigDieHandler { unless ($^S) # skip if die happened in an eval { ...; # create and send email } }
Not tested, YMMV.
In reply to Re^4: Custom SIG DIE handler that isn't executed in evals
by RonW
in thread Custom SIG DIE handler that isn't executed in evals
by tunafish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |