We've had various thoughts and ideas in the past about adding new
strictness or warnings flags, but often they get tripped up on the
meaning of
use strict;
to be a shortcut for "use strict ':all'" and people dislike adding a
new thing that isn't all.
I would like us to get out of this problematic logjam.
To that end, I would like to propose that strict.pm and warnings.pm
should recognise the same version bundle syntax that feature.pm already
does, and builtin.pm will do once anything about it becomes
non-experimental. In that way, it would be neat to explain and
remember, that e.g.
use v5.40;
is really a shortcut for
use strict ':5.40';
use warnings ':5.40';
use feature ':5.40';
use builtin ':5.40';
Currently I am not proposing any actual bundle changes to either of
these modules. Both modules would do the same as they do now, when
given any bundle number between :5.6 and :5.38 (the new "stable"
version as it will be). It's simply to carve out the syntax space for
permitting it in future, as currently they fail:
$ perl
use strict ':5.32';
Unknown 'strict' tag(s) ':5.32' at - line 1.
BEGIN failed--compilation aborted at - line 1.
Once they do support those numbered version bundles, then it would
become quite a lot simpler in future to add some new strictness or
default-on warning flag, which is dependent on that version number.
How do we feel?
* Just do it?
* Write up a full RFC?
* No way because ...?
--
Paul "LeoNerd" Evans
leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
strictness or warnings flags, but often they get tripped up on the
meaning of
use strict;
to be a shortcut for "use strict ':all'" and people dislike adding a
new thing that isn't all.
I would like us to get out of this problematic logjam.
To that end, I would like to propose that strict.pm and warnings.pm
should recognise the same version bundle syntax that feature.pm already
does, and builtin.pm will do once anything about it becomes
non-experimental. In that way, it would be neat to explain and
remember, that e.g.
use v5.40;
is really a shortcut for
use strict ':5.40';
use warnings ':5.40';
use feature ':5.40';
use builtin ':5.40';
Currently I am not proposing any actual bundle changes to either of
these modules. Both modules would do the same as they do now, when
given any bundle number between :5.6 and :5.38 (the new "stable"
version as it will be). It's simply to carve out the syntax space for
permitting it in future, as currently they fail:
$ perl
use strict ':5.32';
Unknown 'strict' tag(s) ':5.32' at - line 1.
BEGIN failed--compilation aborted at - line 1.
Once they do support those numbered version bundles, then it would
become quite a lot simpler in future to add some new strictness or
default-on warning flag, which is dependent on that version number.
How do we feel?
* Just do it?
* Write up a full RFC?
* No way because ...?
--
Paul "LeoNerd" Evans
leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/