[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another take on hackers and painters



At 09:36 AM 5/24/2003 -0700, Paul Prescod wrote:
>Paul Prescod wrote:
>
>>First, what if someone else on my team has created a module that all of a 
>>sudden starts spewing warnings or errors when I turn on the flag?

At 09:36 AM 5/24/2003 -0700, Paul Prescod wrote:
>Paul Prescod wrote:
>
>>First, what if someone else on my team has created a module that all of a 
>>sudden starts spewing warnings or errors when I turn on the flag?

A good reason to follow the standard Perl programming practice of always 
having warnings turned on (i.e. always using the "-w" flag).

 From http://www.psdt.com/publications/psdt_articles/safe_perl.html (by one 
of the authors of a helpful book, "Debugging Perl", that collects good Perl 
development practices in one place)--after describing the "-w" flag and the 
"use strict" pragma, Paul Scott writes:

>The first two lines of any Perl program you write, will therefore be:
>
>#!/path-to-perl -w
>use strict;
>
>You will then be sure that your program generates no warnings or error 
>messages before you declared it finished. Some people believe that the -w 
>flag should not be left on in operational code; I disagree. If you have 
>programmed your code to be "-w-clean", then any occurrence of a warning, 
>no matter when it occurs, is an error that that deserves your attention, 
>whether or not it is found by you or your customers.

___
DC