Re: Disable warnings from specific module



On Feb 27, 11:38 am, snu...@xxxxxxxxx wrote:

I'm using a module with a couple of experimental features
(SOAP::Lite) and, every time these features are used, a warning
message is outputted. I would like to know how can I simply
disable these outputs while keeping warnings for my code?

You could try wrapping a call to any of those experimental features in
a block in which $SIG{__WARN__} has been changed to ignore warnings.
Or you could try locally setting $^W to 0 in a block around those
features (though I don't think that would handle the case where the
module's code is specifically generating a warning using the warn()
function).

{
local $SIG{__WARN__} = sub { 1 };
do_something_experimental();
}

Hope that helps,
Paul Lalli

.



Relevant Pages

  • [PATCH] PPC64 sparse fixes for cpu feature constants
    ... Sparse gives a warning "constant ... ... This patch removes the warnings by using the ASM_CONST macro. ... /* Add the 64b processor unique features in the top half of the word */ ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Messenger
    ... features from it, I get a warning bx saying "The exception unknown software ...
    (alt.os.windows-xp)
  • Messenger
    ... I have been using Yahoo messenger for a long time, but now, if I try to run ... features from it, I get a warning bx saying "The exception unknown software ...
    (alt.os.windows-xp)
  • Re: Excel 97 to 2003
    ... Just a word of warning. ... If you're team is transitioning in stages, ... There are new features added in each new version. ... Dave Peterson ...
    (microsoft.public.excel.misc)
  • -gnatE?
    ... a lot of work has gone into the upcoming GCC 3.4. ... | be more stable, offer some features proposed for Ada 2005, ... I show an option in GPS to enable GNAT experimental features, ...
    (comp.lang.ada)