[sf-perl] use {strict,warnings}

Kevin Frost biztos at mac.com
Sun Mar 2 15:49:32 PST 2008


Most:

Undef vars, vars used only once.
Plus all the stuff I don't screw up anymore after years of strict  
warnings.

Least:

Use of uninitialized variables.

I also catch lots of typos by habitually pertidying as I code.  If my  
indentation suddenly gets thrown out of whack, command-Z and look for  
fat fingers.


  -- frosty

(via iPhone)


On Mar 2, 2008, at 3:28 PM, Quinn Weaver <quinn at fairpath.com> wrote:

> On Sun, Mar 02, 2008 at 02:24:36PM -0800, Rich Morin wrote:
>
>> So, I'd like to hear folks' opinions on what kinds of tests they
>> find most (and least :-) useful, what tests they'd like to have,
>> how best to make them minimally annoying, etc.
>
> Most useful (paraphrased):
>
> - use of undefined variable (catches typos, among other things)
> - variable already defined (for instance, two my $var = statements  
> in one scope)
> - couldn't find $package; did you remember to load $module?
> - no such method $foo (happens at runtime, unfortunately, due to  
> late binding)
> - close called on an unopened filehandle
>
> Least useful:
>
> - Can't think of any. :)
>
> Best way to make them useful:
>
> - Wherever possible, make the analysis static.
> - If you can't do perfectly reliable static analysis, heuristics are  
> still good.
> - Make some kind of prepackaged test target that runs your all your  
> tests
>  (or a chosen subset) and either flunks your program or gives it a  
> clean
>  bill of health.
>
> -- 
> Quinn Weaver, independent contractor  |  President, San Francisco  
> Perl Mongers
> http://fairpath.com/quinn/resume/     |  http://sf.pm.org/
> 510-520-5217
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm


More information about the SanFrancisco-pm mailing list