Re: Disable warnings from specific module
- From: Mark Clements <mark.clementsREMOVETHIS@xxxxxxxxxx>
- Date: Tue, 27 Feb 2007 21:36:15 +0100
snunes@xxxxxxxxx wrote:
Hi,
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?
use strict;
use warnings;
use SOAP::Lite;
I would have expected this to have worked:
mark@owl:~$ cat AA.pm
package AA;
use strict;
use warnings;
sub testsub {
my $test;
print "$test\n";
}
1;
mark@owl:~$ cat testaa.pl
use strict;
use warnings;
use AA;
{
package AA;
use warnings::register;
}
no warnings q(AA);
AA::testsub();
mark@owl:~$ perl testaa.pl
Use of uninitialized value in concatenation (.) or string at AA.pm line 8.
but it doesn't surpress the warning message, although adding
use warnings::register;
to AA.pm has the desired effect.
Mark
.
- 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: Re: Disable warnings from specific module
- Next by thread: Choosing the path based on the system "uname" command
- Index(es):
Relevant Pages
|