NAME
Test::Stream::Util
DESCRIPTION
Tools for generating accessors and other object bits and pieces.
SYNOPSYS
...
EXPORTS
- $success = try { ... }
- ($success, $error) = try { ... }
-
Eval the codeblock, return success or failure, and optionally the error message. This code protects $@ and $!, they will be restored by the end of the run. This code also temporarily blocks $SIG{DIE} handlers.
- protect { ... }
-
Similar to try, except that it does not catch exceptions. The idea here is to protect $@ and $! from changes. $@ and $! will be restored to whatever they were before the run so long as it is successful. If the run fails $! will still be restored, but $@ will contain the exception being thrown.
AUTHORS
SOURCE
The source code repository for Test::More can be found at http://github.com/Test-More/test-more/.
COPYRIGHT
Copyright 2014 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html