in reply to Re: Can I catch a die from someone else's module?
in thread Can I catch a die from someone else's module?
Yes, eval definitely works!
Quick followup:
Do I need the 1; ? It works with and without it, just wanted to make sure it might not be needed for something internal, or was it there for an example?
eval { Module::That::Dies::die_here(); 1; } or do { warn "Error from Module::That::Dies:\n$@\n"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can I catch a die from someone else's module?
by haukex (Archbishop) on Apr 19, 2022 at 18:57 UTC | |
by stevieb (Canon) on Apr 19, 2022 at 19:29 UTC | |
by kcott (Archbishop) on Apr 20, 2022 at 00:47 UTC | |
|
Re^3: Can I catch a die from someone else's module?
by kcott (Archbishop) on Apr 20, 2022 at 00:00 UTC | |
|
Re^3: Can I catch a die from someone else's module?
by perlfan (Parson) on May 02, 2022 at 01:39 UTC | |
|
Re^3: Can I catch a die from someone else's module?
by perlfan (Parson) on May 02, 2022 at 01:46 UTC |