From: Nick Ing-Simmons Date: Wed, 6 Aug 1997 12:00:00 +0000 (+1200) Subject: confessing a carp X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=948f37eb18dbace1def87d7f9339a75821436acd;p=p5sagit%2Fp5-mst-13.2.git confessing a carp Tim Bunce wrote: > > I'd like to be able to use, or tell people to use, a simple command like: > > PERL_CONFESS=1 bad_script.pl Does not work for csh folk - they have to do use env or do setenv. > or > perl -MCarpConfess bad_script.pl This is a bit like -Mblib - pragma-ish so how about perl -Mconfess bad_script.pl > [...] > Note that the whole point is to have a global effect so an alternate Carp > module would not be appropriate. > > I think I prefer the very small change to Carp.pm. I think I prefer the very small auxillary module: Credited: Hugo van der Sanden Credited: Tim Bunce p5p-msgid: 33E79BE2.4E6F@ni-s.u-net.com --- diff --git a/lib/confess.pm b/lib/confess.pm new file mode 100644 index 0000000..e41a7ff --- /dev/null +++ b/lib/confess.pm @@ -0,0 +1,5 @@ +package confess; +require Carp; +*Carp::shortmess = \&Carp::longmess; +1; +__END__