(Replaced by #10922)
authorTony Bowden <tony@kasei.com>
Sun, 24 Jun 2001 17:32:40 +0000 (18:32 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 24 Jun 2001 17:00:34 +0000 (17:00 +0000)
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

lib/Carp.pm

index 69d477b..76a6846 100644 (file)
@@ -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