let me quote part of the documentation of die():
Outside an "eval", prints the value of LIST to "STDERR" and exits with the current value of $! (errno). If $! is 0, exits with the value of "($? >> 8)" (backtick `command` status). If "($? >> 8)" is 0, exits with 255. Inside an "eval()," the error message is stuffed into $@ and the "eval" is terminated with the undefined value. This makes "die" the way to raise an exception.Which means that SOAP::Lite does exactly what you wanted. It throws an exception :-)
You just have to catch it:
eval { some code that might die() }; if ($@) { handle the exception you find in $@ }
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
In reply to Re: Keeping perl alive after a module calls die.
by Jenda
in thread Keeping perl alive after a module calls die.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |