vek has asked for the wisdom of the Perl Monks concerning the following question:
Esteemed monks. I'm sure I'm missing something very simple here...
Just had to modify some code written by a co-worker. Usually I use -w to turn-on warnings in my code. The co-worker had opted for use warnings; instead.
A warning is generated from a tiny subroutine that I needed to temporarily disable. Now usually in my code I would do local $^W = 0; et voila - no warnings. A quick perusal of the doc led me to believe that I could say no warnings; and that would also temporarily turn off warnings. Didn't work.
Did I miss something from RTFM? Should no warnings; just before the offending code temporarily disable warnings a-la local $^W = 0;?
Just had to modify some code written by a co-worker. Usually I use -w to turn-on warnings in my code. The co-worker had opted for use warnings; instead.
A warning is generated from a tiny subroutine that I needed to temporarily disable. Now usually in my code I would do local $^W = 0; et voila - no warnings. A quick perusal of the doc led me to believe that I could say no warnings; and that would also temporarily turn off warnings. Didn't work.
Did I miss something from RTFM? Should no warnings; just before the offending code temporarily disable warnings a-la local $^W = 0;?
2002-03-31 Edit by the node bunny : Changed title from "Warnings"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Warnings
by japhy (Canon) on Feb 02, 2002 at 14:19 UTC | |
Re: Warnings
by clintp (Curate) on Feb 02, 2002 at 16:15 UTC | |
Re: Warnings
by BazB (Priest) on Feb 02, 2002 at 15:34 UTC | |
by vek (Prior) on Feb 02, 2002 at 15:46 UTC |
Back to
Seekers of Perl Wisdom