5.12 in fact already does that.
| [reply] |
perl5120delta says under Implicit stricturesUsing the use VERSION syntax with a version number greater or equal to 5.11.0 will lexically enable strictures just like use strict would do (in addition to enabling features.)
which is why my script template starts out with
use 5.011; # implies strict + feature 'say'
and when (not if) someone asks where to find that odd (pun intended) version of perl, it's a good time to remind them that use specifies the minimum version. | [reply] [d/l] |
I'm glad to hear that versions after 5.10.0 started doing what I would call the Right Thing-- somehow I missed the change. Myself, I'm still usually specifying version 10 in the code that I write, but then I generally create code using templates that also have "use strict" and "use warnings" lines-- you don't care much about a few redundant lines when you always start from the same template.
And in any case, any of the modern object systems are going to turn on strict and warnings by default.
| [reply] |
| [reply] [d/l] |