summaryrefslogtreecommitdiff
path: root/lib/Carp.pm
diff options
context:
space:
mode:
authorTony Bowden <tony@kasei.com>2001-06-24 18:32:40 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-24 17:00:34 +0000
commitf43adeb59ad0b6b1b88cac94966f40d736797192 (patch)
tree47c92916a36c2ff12ef25926b4a0d6ab8a1d1272 /lib/Carp.pm
parent273b0206b8797b55ea5c05965028980ae791780b (diff)
downloadperl-f43adeb59ad0b6b1b88cac94966f40d736797192.tar.gz
(Replaced by #10922)
Subject: Re: [PATCH] Re: [ID 20010624.001] debugger T, and Carp::carp don't trace arg of Message-ID: <20010624173240.A16293@blackstar.co.uk> Document (well, mention) shortmess() and longmess() to rob people of their fun of reinventing the wheel. p4raw-id: //depot/perl@10899
Diffstat (limited to 'lib/Carp.pm')
-rw-r--r--lib/Carp.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Carp.pm b/lib/Carp.pm
index 69d477b486..76a6846163 100644
--- a/lib/Carp.pm
+++ b/lib/Carp.pm
@@ -51,6 +51,11 @@ The Carp routines don't handle exception objects currently.
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.
@@ -75,7 +80,7 @@ $CarpInternal{Carp}++;
require Exporter;
@ISA = ('Exporter');
@EXPORT = qw(confess croak carp);
-@EXPORT_OK = qw(cluck verbose);
+@EXPORT_OK = qw(cluck verbose longmess shortmess);
@EXPORT_FAIL = qw(verbose); # hook to enable verbose mode