Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Who is turning $^W on?by Aighearach (Initiate) |
on Nov 08, 2004 at 16:02 UTC ( [id://406093]=note: print w/replies, xml ) | Need Help?? |
If you take a look at perldoc perllexwarn you'll find that the warnings pragma is not exactly the same as setting $^W. In particular, the pragma is scoped to the enclosing block. So if $^W is getting set, you can be pretty sure that you need to search for an actual $^W assignment, and not a use warnings pragma.
You could use the perl debugger to find the offender. Or just grep your files and modules you use for $^W. Also note that, if you don't need pre-5.6.0 compatability, then look at perldoc warnings and in particular warnings::register() which provides a good way of turning on and off your own warnings, giving finer control to the user of your module. -- Snazzy tagline here
In Section
Seekers of Perl Wisdom
|
|