Exception::WarningConvert simple warn into real exception object | |
Download |
Exception::Warning Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Piotr Roszatycki
- Publisher web site:
- http://search.cpan.org/~dexter/MooseX-GlobRef-Object-0.02/lib/MooseX/GlobRef/Object.pm
Exception::Warning Tags
Exception::Warning Description
Convert simple warn into real exception object Exception::Warning is a Perl module to convert simple warn into real exception object.SYNOPSIS # Convert warn into exception and throw it immediately use Exception::Warning '%SIG' => 'die'; eval { warn "Boom!"; }; print ref $@; # "Exception::Warning" print $@->warning; # "Boom!" # Convert warn into exception without die use Exception::Warning '%SIG' => 'warn', verbosity => 4; warn "Boom!"; # dumps full stack trace # Can be used in local scope only use Exception::Warning; { local $SIG{__WARN__} = &Exception::Warning::__WARN__; warn "Boom!"; # warn via exception } warn "Boom!"; # standard warn # Run Perl with verbose warnings perl -MException::Warning=%SIG,warn,verbosity=>3 script.pl # Run Perl which dies on first warning perl -MException::Warning=%SIG,die,verbosity=>3 script.pl # Run Perl which ignores any warnings perl -MException::Warning=%SIG,warn,verbosity=>0 script.pl Requirements: · Perl
Exception::Warning Related Software