* On Tue, Jun 16 2009, Bill Ward wrote: > I'm more interested (at $JOB) in global warnings, actually. Of course > one can enable those with $^W or "perl -w" and I do, but developers > ignore the warnings all too often. Many of our core modules were > written without warnings enabled, and people are slow to fix those > warnings. So, we want to make warnings fatal in the development > environment to force developers to fix those niggling "uninitialized > value" warnings that are all over the place in our log files.
Honestly, I think this is worth bringing up on p5p. I think it should be possible to convince perl to give user code control over the hints hash as each scope is compiled. I tried the obvious technique of: package forcewarn; use strict; use B::Hooks::OP::Check::StashChange; our $id = B::Hooks::OP::Check::StashChange::register(sub { my ($new, $old) = @_; warn "compiling $new"; warnings->import( FATAL => 'all' ); }); 1; And then "use forcewarn" before any of my code compiled, but the warnings->import only seems to affect the calling scope, not the scope currently being compiled. I have a feeling that with some tweaking this will work, though, and would be interested to see if anyone has some insight here. Regards, Jonathan Rockway -- print just => another => perl => hacker => if $,=$"