develooper Front page | perl.perl5.porters | Postings from June 2012

Re: [PATCH] Add "use strict" to lib/

Thread Previous | Thread Next
Shlomi Fish
June 14, 2012 01:16
Re: [PATCH] Add "use strict" to lib/
Message ID:
Hi Richard,

On Mon, 11 Jun 2012 13:17:21 +0200
Richard Foley <> wrote:

> A solution which would permit the patch (or one similar) might be to make the
> "use strict" behaviour dependent on an option setting, something like:
>     PERLDB_OPTS="useStrict=1" perl -d ...
> Just an idea.

This will be very hard to do properly because "use strict;" is lexically
scoped. For example, this code runs fine:


sub called_sub
    $x = 500;
    print "X = $x\n";

sub caller_sub
    use strict;


Furthermore, since the patch makes the code conform to the "use strict;"
conventions, why not enable it and gain the advantages of Otherwise
we will have strict-compliant code without "use strict;".


	Shlomi Fish

Shlomi Fish
Free (Creative Commons) Music Downloads, Reviews and more -

<rindolf>  If you repeat a scene 50k times, then the movie will have less 
entropy and will compress better. ( irc:// )

Please reply to list if it's a mailing list post - .

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