use Carp qw(cluck);
cluck "This is how we got here!";
+ print FH Carp::shortmess("This will have caller's details added");
+ print FH Carp::longmess("This will have stack backtrace added");
+
=head1 DESCRIPTION
The Carp routines are useful in your own modules because
will report the error as occurring where Foo() was called,
not where carp() was called.
+The routine shortmess() can be used to generate the string that
+carp/croak would have produced. The routine longmess() can be
+used to generate the backtrace that cluck/confess would have
+produced.
+
=head2 Forcing a Stack Trace
As a debugging aid, you can force Carp to treat a croak as a confess
If called with a first argument that is a reference, they simply
call die() or warn(), as appropriate.
-However, rather than duplicating this effort in your own exception
-object, you can access the caller information that croak() would supply
-as shortmess(), and the full stack trace that confess() would generate
-as longmess() (Neither of these are exported by default.)
-
=cut
# This package is heavily used. Be small. Be fast. Be good.