From: Papo Napolitano <[EMAIL PROTECTED]>
> Is there any way of suppressing warnings/errors thrown by Carp other
> than redirecting STDERR to /dev/null?

perldoc perlvar

        ...
            Certain internal hooks can be also set using the %SIG 
hash. The
            routine indicated by $SIG{__WARN__} is called when a 
warning
            message is about to be printed. The warning message is 
passed as
            the first argument. The presence of a __WARN__ hook 
causes the
            ordinary printing of warnings to STDERR to be suppressed. 
You
            can use this to save warnings in a variable, or turn 
warnings
            into fatal errors, like this:

                local $SIG{__WARN__} = sub { die $_[0] };
                eval $proggie;

HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to