Perl try, catch, eval, die, warn, carp
http://www.dzone.com/snippets/trycatch-simple-try-catch
http://c2.com/cgi/wiki?ExceptionHandlingInPerl
http://www.caveofprogramming.com/perl/perl-eval-using-eval-to-run-code-and-trap-errors-in-perl/
using http://search.cpan.org/~doy/Try-Tiny-0.12/lib/Try/Tiny.pm
http://www.perlmonks.org/?node_id=384038
http://search.cpan.org/~ash/TryCatch-1.003002/lib/TryCatch.pm
http://www.perl.com/pub/2002/11/14/exception.html
http://perldoc.perl.org/Carp.html
Perl's Warn and Die Signals
http://www.perlmonks.org/?node_id=51097
http://www.perlmonks.org/?node=warn
http://www.perlmonks.org/?node=die
# warn user (from perspective of caller)
carp "string trimmed to 80 chars";
# die of errors (from perspective of caller)
croak "We're outta here!";
# die of errors with stack backtrace
confess "not implemented";
# cluck, longmess and shortmess not exported by default
use Carp qw(cluck longmess shortmess);
cluck "This is how we got here!";
$long_message = longmess( "message from cluck() or confess()" );
$short_message = shortmess( "message from carp() or croak()" );
From JR's : articles
93 words - 1137 chars
created on
import date 2013-08-12 21:50:40
- #
source
- versions
Related articles
Perl regex extracting domain name from URL code example - Oct 02, 2013
Perl links to read - Jul 09, 2013
Installing a Perl Module - Jan 13, 2015
Perl and OAuth - Dec 03, 2013
Add HTML Scrubber to Junco - Oct 01, 2013
more >>