in reply to Re^2: Writing a better Modern::Perl
in thread Writing a better Modern::Perl
Besides, writing "use 5.012;" without a "use strict;" runs the risk someone removes the "use 5.012;" (not unreasonable if there's nothing in the code that actually needs 5.012...), and then have it be without strict.
I never liked the idea that "use 5.XXX" implies subtle changed behaviour other than "without the mentioned version, it's unlikely to compile". I prefer "use 5.XXX" to mean one of "if you try to compile this with 5.YYY, where YYY < XXX, you'll fail" or "this code will trigger a bug in 5.YYY, which was fixed in 5.XXX". The implicite turning on of strict isn't such a change. Now it mean "if you try to run this with 5.YYY, I'm going to keep quiet if you screw up". Not what I expect of a helpful language.
I will only slap a "use 5.012;" label on my code if there's actually anything in my code that won't run on 5.010. So far, I've written next to no code that needs 5.012. I'm not going to artificially restrict my code to a certain version just so I don't have to type a few keystrokes (which I don't have to type in the first place - an editor macro does that for me).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Writing a better Modern::Perl
by ikegami (Patriarch) on Oct 08, 2010 at 17:58 UTC | |
by JavaFan (Canon) on Oct 08, 2010 at 20:15 UTC | |
by chromatic (Archbishop) on Oct 08, 2010 at 20:20 UTC | |
by ikegami (Patriarch) on Oct 08, 2010 at 21:11 UTC | |
by chromatic (Archbishop) on Oct 08, 2010 at 21:31 UTC | |
| |
by ikegami (Patriarch) on Oct 08, 2010 at 20:59 UTC |