X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsigtrap.pm;h=dd4df906fad87d5bb70a93aaaa00917102344063;hb=26221e3534264780d1048cb71f853279863ceb01;hp=72b9cb60441025f0be96a8834ef973abedb71e05;hpb=a0d0e21ea6ea90a22318550944fe6cb09ae10cda;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/sigtrap.pm b/lib/sigtrap.pm index 72b9cb6..dd4df90 100644 --- a/lib/sigtrap.pm +++ b/lib/sigtrap.pm @@ -1,5 +1,27 @@ package sigtrap; +=head1 NAME + +sigtrap - Perl pragma to enable stack backtrace on unexpected signals + +=head1 SYNOPSIS + + use sigtrap; + use sigtrap qw(BUS SEGV PIPE SYS ABRT TRAP); + +=head1 DESCRIPTION + +The C pragma initializes some default signal handlers that print +a stack dump of your Perl program, then sends itself a SIGABRT. This +provides a nice starting point if something horrible goes wrong. + +By default, handlers are installed for the ABRT, BUS, EMT, FPE, ILL, PIPE, +QUIT, SEGV, SYS, TERM, and TRAP signals. + +See L. + +=cut + require Carp; sub import {