X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCarp.pm;h=ba21d9c6252b0e45888179e32054bf07c5eadd45;hb=c296029969658ed2c8d9a223d4b09026463ca970;hp=c847b77b36af6f367cf5492657398815f437b341;hpb=748a93069b3d16374a9859d1456065dd3ae11394;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Carp.pm b/lib/Carp.pm index c847b77..ba21d9c 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.