in reply to I don't care about *your* warnings!
You can't disable a module's warnings if they were enabled using use warnings;.
If the module's warnings are enabled using -w or $^W, you can disable them using
{ local $^W = 0; call_other_module(); }
If you want others to be able to disable your warnings, you can do something like the following:
use if !$ENV{NOWARN}, 'warnings';
Note: The condition — !$ENV{NOWARN} in this case — is evaluated at the module's compile time, when its loaded.
( philcrow mentioned warnings::register as another means of letting others silence your warnings. )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: I don't care about *your* warnings! (register)
by tye (Sage) on Feb 28, 2007 at 20:32 UTC | |
by ikegami (Patriarch) on Feb 28, 2007 at 21:07 UTC |