in reply to Benefits of -w

I'd still say go with -w; you're not going to change how your CGI runs, but being able to catch uninitialized values now means that when you might expand or debug a new part of the script, you won't be bitten by problems. Most of the fixes where you have uninitialized values probably mean you need to do things like $value = $cgi->param( 'field' ) || ''; as to clean the uninitialized portion out.

And, perl -wT and 'use strict' are good habits to get into now, particularly as a CGI author, as repeated countless times here.

To actually do this, I'd put on -w for a script, check it from the command line, then modify as needed; repeat for all scripts. Then, watch the error.log file as there will still be warnings that were not seen during compilation that might be obtained during runtime, and fix these; this latter step may take several weeks or months to completely do because of how the site gets used.

Very much alternatively, you could have a script that when the logs are archived out, you can strip all lines with that warning on them, as to shorten the text file. Of course, ignoring such an error may result in something worse in the future.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain