Exception-Class - Re: How to Control Exit Values?

Posted on Fri Feb 24 22:14:04 2006 by jdhedden in response to 1849 (See the whole thread of 5)
Re: How to Control Exit Values?
    I notice that the exit value is 0

This doesn't make sense. Exception::Class exits using die(). This results in a non-zero exit status, usually 255. (I tested this to be sure.)

To set your own exit status, you can set a __DIE__ handler and supply exit() with whatever value you want:
$SIG{__DIE__} = sub { print(STDERR @_); exit(99); };
Direct Responses: 1852 | 1870 | Write a response