http://www.perlmonks.org?node_id=895978


in reply to Why version strings?

I've heard the argument that it allows you to switch off features introduced in the latest version but shouldn't it be done the other way round, ie. specify if you want limitations, not to enable what is available by default?
Neither is true.

First, use 5.XXX; has always had the meaning "your perl binary needs to be at least 5.XXX for the program to run". This could be because the program uses features not available before, or because a bug-fix essential for the correctness of the program happened in 5.XXX.

Now, since 5.10, use 5.010; also enables some of the new features of 5.10. Most of them you get regardless, whether you have an explicite use 5.010; or not. But a few features have the potential to clash with existing code; say is best known example. The alternative, a policy that's followed up to 5.10 is to not make say part of the language.

Since 5.12, use 5.012; could also introduce changes in behaviour. I'm not too fond of that - it means that if you take a program that has use 5.012;, and remove it or change it to say, use 5.010;, you don't get compilation errors (what you typically would get if do say "foo" and remove the use 5.010; statement), or even runtime errors. Your program just misbehaves - and it'll be hard to debug.

And don't say "don't do that". People have slapped on a use 5.XXX for too high versions. I've made 5.8 modules work on 5.6 by just removing the use 5.008;, and even further back by removing use 5.006; to get them working on 5.005. It was always safe to try - you'd get a compilation error if the use 5.006; or use 5.008; was indeed needed.

Perl never has used use 5.XXX; to impose limitations. The main purpose of use 5.XXX; is to signal "this code will not compile/run correctly on versions before 5.XXX". And you'd still get most of the functionality of 5.12 by just running 5.12, regardless whether you're using use 5.012; or not. (The only things you'll miss out on: say, given/when (but you do get smart match), state, Unicode strings and strict enabled). AFAIK, 5.14 will not introduce new features that aren't enabled by default.