8.32. Carp
Provides
routines for generating error messages. Its subroutines generally
report errors from the perspective of the calling program. It has the
following functions.
Warns of an error; reports the error as having occurred in the
carp msg
calling routine, not in the routine that contains the
carp.
Use Carp;
carp "text of error message";
Warns of errors and prints a stack backtrace; reports the error as
cluck msg
having occurred in the calling routine. Not exported by default.
use Carp qw(cluck);
cluck "text of error message";
Dies and prints a stack backtrace. Reports the error as having
confess msg
occurred at the point where confess was called.
Dies and reports error as having occurred in the calling routine.
croak msg