perl5.001 patch.1f
[p5sagit/p5-mst-13.2.git] / pod / modpods / Carp.pod
CommitLineData
a0d0e21e 1=head1 NAME
2
3carp - warn of errors (from perspective of caller)
4
5croak - die of errors (from perspective of caller)
6
7confess - die of errors with stack backtrace
8
9=head1 SYNOPSIS
10
11 use Carp;
12 croak "We're outta here!";
13
14=head1 DESCRIPTION
15
16The Carp routines are useful in your own modules because
17they act like die() or warn(), but report where the error
18was in the code they were called from. Thus if you have a
19routine Foo() that has a carp() in it, then the carp()
20will report the error as occurring where Foo() was called,
21not where carp() was called.
22