On Fri, Feb 16, 2001 at 02:48:01PM -0800, Edward Peschko wrote:
> 1) be lax on warnings and strict in a script, assume strictness and
> warnings in the modules. Rationale: in a script, you really
> have an audience of one. With few exceptions, you are only
> running the script for yourself.
>
> With a *module* however, you should know better. Since you
> are intending your code to work with the 'outside world', you
> have a civic duty to make your interface clean. And if you
> really know what you are doing, you can turn off the warnings,
> strictness as you see fit.
Its a fine rationale, but I'm very, very loathe to implicitly split
Perl into two seperate languages based on what the filename is.
> 2) provide a flag (-W ) which is a combo of 'use strict' and
> 'use warn' for scripts. Perhaps the -W should have warning
> levels ie - '-W1' means just warn, '-W2' == warn + strict,
> etc etc etc.;
It doesn't make much sense to make 'strict' an easy command line flag.
strict is something you want on either all the time or not at all
(with regards to a single program).
Of course, you'd want to have "perl -l -Wall" ;)