Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Austin Schutz has written a module that handles errors by having functions return undef on error

    Here's my quick & dirty (UNTESTED)

    package Smartass;

    use Exporter;
    my @sigs = keys(%SIG);
    push(@sigs,'__WARN__','__DIE__'); # Optional in lieu of 'eval'
    foreach(@sigs){ $SIG{$_} = sub{ return undef } }

    # For good measure
    *CORE::GLOBAL::die = sub{ return undef }
    *CORE::GLOBAL::warn = sub{ return undef }

    @EXPORT = qw(%SIG);