develooper Front page | perl.perl5.porters | Postings from December 2007

Re: 5.11 (or 12) and strict

Thread Previous | Thread Next
December 27, 2007 08:30
Re: 5.11 (or 12) and strict
Message ID:
Michael G Schwern wrote:

> Sean O'Rourke wrote:
>> Steffen Mueller <> writes:
>>> If you write enough code to make importing optional features
>>> worthwhile, odds are very high you'd be importing "strict"
>>> anyway.
>> I'm not a p5p regular or a Perl core developer, so you definitely
>> can, probably will, and possibly should ignore me.
>> That being said, the above quote basically says "if you want to
>> use some desirable feature (like given/when) that is in Perl >
>> 5.10, you must accept this other feature (strictures) P5P deems
>> healthy," which seems strangely authoritarian.
> That's how "use 5.XXX" works with regard to feature.  You get  
> everything or
> nothing.  Somebody has to decide what "everything" is.  Besides,  
> this is more
> making the defaults fall in line with existing good practice than  
> dictating.

Exactly. I think that most if not all the modules and programs we  
maintain begin with "use strict;".
On the CPAN, the only modules that I maintain which lacks "use  
strict" is XSLoader because it's supposed to be an as light as  
possible interface to DynaLoader.

Besides, "use strict" still allows awful constructs. Take a look at  
the code I pasted in [1]. It has "use strict" at the top of the file,  
yet the part I pasted looks more like line noise or INTERCAL than Perl.

So something that would be more interesting is making  
stricter, but there are backward compatibility issues: adding new  
domains by default will probably break existing code, and current dies on unknown tags.


S├ębastien Aperghis-Tramoni

Close the world, txEn eht nepO.

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