As some may know, use 5.011
activates strictures. I think that's a good idea, but I don't think that's enough. I strongly feel that it should be more progressive than that. I think it should do what Modern::Perl
aims to do implement: Some small, important and uncontroversial pragmas (as opposed to Perl 5i, which does do big and controversial things). My list of things would be:
use feature '5.011';
use warnings;
use IO::Handle;
no indirect;
use mro 'c3';
use 5.011
(and thus eventually use 5.012
) should mean.
It already does "use feature '5.011';". And it was hard to add even "use strict" - too much opposition. "use warnings" would have even more.
Strongly disagree with IO::Handle and warnings
. Strictures are important, warnings are not (note that I almost always enable them).
Would like no indirect
, but I doubt it’ll happen.
Not opposed to C3, but indifferent.
Re:Sorry, no
chromatic on 2009-08-23T00:53:27
What's wrong with
IO::Handle
? 5.6 could have supported calling methods on lexical filehandles without loadingIO::Handle
explicitly without violating the Principle of Least Surprise. (I could argue that having an object you can't actually call methods on violates PoLS.)
I've been doing this for years in code without any problems, so I think it's a good candidate if strictures are going to be enabled.