diff options
Diffstat (limited to 'lib/Carp.pm')
-rw-r--r-- | lib/Carp.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Carp.pm b/lib/Carp.pm index c847b77b36..ba21d9c625 100644 --- a/lib/Carp.pm +++ b/lib/Carp.pm @@ -1,5 +1,29 @@ package Carp; +=head1 NAME + +carp - warn of errors (from perspective of caller) + +croak - die of errors (from perspective of caller) + +confess - die of errors with stack backtrace + +=head1 SYNOPSIS + + use Carp; + croak "We're outta here!"; + +=head1 DESCRIPTION + +The Carp routines are useful in your own modules because +they act like die() or warn(), but report where the error +was in the code they were called from. Thus if you have a +routine Foo() that has a carp() in it, then the carp() +will report the error as occurring where Foo() was called, +not where carp() was called. + +=cut + # This package implements handy routines for modules that wish to throw # exceptions outside of the current package. |