use Carp;
-$VERSION = 1.02;
+$VERSION = 1.04;
$Verbose ||= 0;
sub import {
# Now go for broke.
for ($i = 1; ($p,$f,$l,$s,$h,$w,$e,$r) = caller($i); $i++) {
@a = ();
- for $arg (@args) {
- $_ = "$arg";
+ for (@args) {
s/([\'\\])/\\$1/g;
s/([^\0]*)/'$1'/
unless /^(?: -?[\d.]+ | \*[\w:]* )$/x;
=item B<stack-trace>
-The handler used for subsequently installed signals will output a Perl
-stack trace to STDERR and then tries to dump core. This is the default
-signal handler.
+The handler used for subsequently installed signals outputs a Perl stack
+trace to STDERR and then tries to dump core. This is the default signal
+handler.
=item B<die>
I<your-handler> will be used as the handler for subsequently installed
signals. I<your-handler> can be any value which is valid as an
-assignment to an element of C<%SIG>.
+assignment to an element of C<%SIG>. See L<perlvar> for examples of
+handler functions.
=back
=head2 SIGNAL LISTS
-B<sigtrap> has two built-in lists of signals to trap. They are:
+B<sigtrap> has a few built-in lists of signals to trap. They are:
=over 4
=item B<untrapped>
-This token tells B<sigtrap> only to install handlers for subsequently
+This token tells B<sigtrap> to install handlers only for subsequently
listed signals which aren't already trapped or ignored.
=item B<any>
=item I<signal>
-Any argument which looks like a signals name (that is,
-C</^[A-Z][A-Z0-9]*$/>) is taken as a signal name and indicates that
-B<sigtrap> should install a handler for it.
+Any argument which looks like a signal name (that is,
+C</^[A-Z][A-Z0-9]*$/>) indicates that B<sigtrap> should install a
+handler for that name.
=item I<number>