Galen Charlton wrote:
Ideally, all Perl scripts and modules should have warnings enabled by the time 3.2 is released.
1000 applauds. Furthermore, demand that the error_log is *empty* during normal use, i.e. a non debug environment.
I propose the following steps to implement this:
1. Update the coding guidelines to require 'use strict' and 'use warnings'. 2. For any new scripts and modules, require 'use warnings'. Since Koha (per Makefile.PL) requires at least Perl 5.6.1, the 'use warnings' pragma should be used instead of -w.
IIRC, it is trivial to grab warnings.pm and install it if your version of Perl does not have the built-in pragma.
6. "no warnings" should not be used absent a detailed comment explaining why warnings should be turned off within a block and why it is not possible to change the code to avoid the warning. It _might_ be acceptable for temporary use while turning on warnings in a big module
I've only had to turn warnings off once in years of coding Perl. That was for one line of code that created a new method on the fly via introspection. Admittedly a rare thing indeed. "big modules" have more need of "use warnings" IMHO. I'll take on the challenge. Show me a some Perl that requires warnings to be turned off and I'll show you how to fix it :) cheers rickw -- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor The urge to save humanity is almost always only a false-face for the urge to rule it. -- H.L. Mencken