4 ms·
Note that the use 5.10; puts this article circa 2010
by falsedan 9y ago
Note that the
use 5.10;
puts this article circa 2010
- zbentley 9y ago1. It doesn't say that, it says "use 5.010". 2. This technique is often used to guarantee minimum version requirements of a piece of code. No reason to lock your code to the latest version of the runtime if you know it requires features from an older one.
- jlv2 9y agoThe article appears to be new. "use 5.10" enables 'say' in the language.
- falsedan 9y agoI read this article in 2010.
- SwellJoe 9y agoI still use 5.10 because that's what ships with CentOS 6 and my products will continue to support CentOS 6 until it reaches EOL. I think it'll be very common to target 5.10 until CentOS 6 dies. Any of my Perl code, even code written today, would include this line. I don't think it places the article in time. As an aside, Red Hat, for a long time, would ship old Perl versions in RHEL, even at the very beginning of the RHEL version lifecycle. Which meant you would be stuck with a truly ancient Perl version by the time the RHEL version reached end-of-life. I mean, 5.8.x was already several years old when it was settled on for RHEL 5, and was EOL by the Perl community for a couple of years while RHEL/CentOS 5 were still shipping it. RHEL/CentOS have gotten a bit better about it in recent years, I think because there are some folks actively maintaining Perl packages for Fedora and those trickle down into RHEL/CentOS, so it's not quite as bad as it used to be, but we still end up stuck with pretty old versions for the last couple years of a RHEL/CentOS release, which is annoying. There are, of course, good options for building/maintaining newer versions for your own development or deployment in hosted app deployments (plenv, perlbrew, etc.), but if you want to be able to run with minimal dependencies and no requirement that end users install a whole new Perl, you will still `use 5.010;` instead of something newer.
- falsedan 9y agoI'm not arguing against backwards-compatibility; but pointing out the technique in the article has been around for a while since it was first written 7 years ago.