Re: Disable warnings from specific module
- From: "Paul Lalli" <mritty@xxxxxxxxx>
- Date: 27 Feb 2007 11:52:25 -0800
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
.
- References:
- Disable warnings from specific module
- From: snunes
- Disable warnings from specific module
- Prev by Date: Re: DocumentHTML ?
- Next by Date: Re: Choosing the path based on the system "uname" command
- Previous by thread: Disable warnings from specific module
- Next by thread: Re: Disable warnings from specific module
- Index(es):
Relevant Pages
|