The response to my original Ouch post has been overwhelming. Based upon the number of responses it got and the number of emails I personally received about it, Ouch must have struck a cord.

I've taken the feedback I've received and released Ouch 0.03. New feature details after the jump.

The new features are:

Non-integer codes - You can now use a code like ouch 'missing_param', 'Email address needed.', 'email'; And check for it with kiss 'missing_param' .

hug - Catch any exception, including non-ouch exceptions.

use Ouch qw(:traditional) - Imports four new functions into the namespace. They are:

try - A nice wrapper around eval .

throw - An alias for ouch .

catch - An alias for kiss .

catch_all - An alias for hug .



The usage of these new funcs work like this:

use Ouch qw(:traditional); my $e = try {

throw 404, 'File not found.';

}; if ( catch 404, $e ) {

# do the big thing

}

elsif ( catch_all $e ) {

# make it stop

}

else {

# make it go

}



Thanks for all the feedback. Enjoy!