Sig::PackageScopedSig::PackageScoped is a Perl module to make $SIG{__DIE__} and $SIG{__WARN__} package scoped. | |
Download |
Sig::PackageScoped Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Dave Rolsky
- Publisher web site:
- http://search.cpan.org/~drolsky/MooseX-Policy-SemiAffordanceAccessor-0.02/lib/MooseX/Policy/SemiAffordanceAccessor.pm
Sig::PackageScoped Tags
Sig::PackageScoped Description
Sig::PackageScoped is a Perl module to make $SIG{__DIE__} and $SIG{__WARN__} package scoped. Sig::PackageScoped is a Perl module to make $SIG{__DIE__} and $SIG{__WARN__} package scoped.SYNOPSIS use Sig::PackageScoped qw(set_sig unset_sig); set_sig( __DIE__ => sub { die "Really dead: @_" } ); unset_sig( __DIE__ => 1 );If all your modules use this module's functions to declare their signal handlers, then they won't overwrite each other. If you're working with modules that don't play nice, see Sig::PackageScoped::Paranoid. But really, this is more of a demonstration of weird things you can do with Perl than a good thing to use in production. You have been warned.EXPORTSThis module will optionally export the set_sig and subroutines. By default, nothing is exported.FUNCTIONSThis module provides the following functions:set_sig()This function accepts a hash of options. The keys can be either __DIE__ or __WARN__, and the values should be coderefs to handle the specified pseudo-signal.unset_sig()This function also expects a hash. The keys should be the pseudo-signal to unset, and the value can be any true value. Requirements: · Perl
Sig::PackageScoped Related Software