in reply to Re^2: Common uses of "use" (warnings?)
in thread Common uses of "use"
Obviously, there ARE situations when you want to get these warnings,
Just to be clear, I usually use #!/usr/bin/perl -w (as the first line of each script) which means that I get more warnings than I would if I used use warnings;.
Users of a script usually don't have many ways of giving the script undefined values so the line between "script user" and "script" is not the same as the line between between "module user" and "module" with regard to warnings. If I test a script well, then I usually won't leave it up to the script user to launch via "perl -w ..." in order to get warnings.
However, for scripts that get run other than by other either developers or IT workers, I do indeed sometimes leave warnings turned off when the script is deployed. Warnings seen by a non-technical user or written to a Production log file are very often worse than useless. The lower the odds of "the warning making it back to a developer along with sufficient information for the cause of the warning to be identified so the code can be fixed to eliminate the warning (and perhaps a bug that the warning detected)", the less value there is to leaving warnings enabled.
- tye
|
|---|