develooper Front page | perl.perl6.language.strict | Postings from February 2001

Re: Warnings, strict, and CPAN

Thread Previous | Thread Next
Bart Lateur
February 18, 2001 16:16
Re: Warnings, strict, and CPAN
Message ID:
On Fri, 16 Feb 2001 21:03:54 -0800, Edward Peschko wrote:

>It is one hell of a burden to find a missing 'use strict' or 'use warnings'.
>'Well, type them then' you say. Right, and always type ';' at each line, or 1;
>at the end of each file. Its as unavoidable as a *syntax error*, which is the 
>point. syntax errors should be easy to fix, not hour-long treks through code.

It seems to me that *that* is your main problem. Not the fact that
strict and warnings aren't put in by the perl interpreter itself, but
that perl code is so difficult to debug. Something as simple as
requiring variable declarations or initializing variables ought not take
hours of debugging, assuming that for the rest, the source works
reasonably OK. So, 

 A) a code profiler that can verify use of variables and stick a limited
scope onto every variable, plus optionaly initializing variables to ''
or 0, that might be handy at times.

 B) perl's error messages could be somewhat more helpful. If you have a
here doc with 30 lines of interpolated pure text, it's extremely
annoying that perl will only point you to this data block (actually to
the line containign the "<<"), and just say "use of uninitialized value"
without saying *which* variable it is talking about. But, this has been
brought of on the perl6 lists a few times already.

All this could help strictifying and warn-proofing otherwise properly
working modules, in say, oh, five minutes.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About