Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Out-of-the box Perl version - lowest common denominator

by kcott (Bishop)
on Jan 15, 2021 at 05:00 UTC ( #11126941=perlquestion: print w/replies, xml ) Need Help??

kcott has asked for the wisdom of the Perl Monks concerning the following question:

G'day All,

At $work, we're currently coding to Perl 5.16.0 as a minimum version: our clients are expected to have this version available to be able to run our software.

We are considering increasing that minimum version. Doing so has been agreed in principle. However, we're scratching our heads a bit, trying to determine what a practical new version might be.

By out-of-the box, I'm talking about what's available either as a new installation, or through standard updates through package managers. I'm not referring to what's possible by manual builds or using installation software (such as Perlbrew).

As an example, I've quite recently updated Cygwin, which gives me:

$ /usr/bin/perl -v | head -2 | tail -1 This is perl 5, version 30, subversion 3 (v5.30.3) built for x86_64-cy +gwin-threads-multi

I have also installed a few Perl versions using Perlbrew:

$ perlbrew list perl-5.33.5 * perl-5.32.0 perl-5.30.0

So my answer to this question would be: "Cygwin: 5.30.3".

I added "lowest common denominator" because, in practical terms for the current exercise, it's more important to know "ABC Linux: 5.20.0" than "XYZ Linux: 5.32.0".

Your feedback on this would be very much appreciated. Thanks in advance.

— Ken

Replies are listed 'Best First'.
Re: Out-of-the box Perl version - lowest common denominator
by Tux (Canon) on Jan 15, 2021 at 07:55 UTC

      G'day Tux,

      With 2,082 records, a lot of effort must have gone into compiling that CSV. It looks like an excellent resource; thanks for sharing.

      — Ken

Re: Out-of-the box Perl version - lowest common denominator
by eyepopslikeamosquito (Bishop) on Jan 15, 2021 at 08:33 UTC

    our clients are expected to have this version available to be able to run our software
    You seem to have a significantly different business model and customers to us (I'd be interested to learn more about your business model BTW).

    Our customers are not technical, could not care less about Perl (and we would not trust them to install Perl or CPAN modules) ... so we bundle a specific Perl version, along with all CPAN modules we need, in such a way so as to not interfere with the system Perl - as described in my reply to putting perl and modules in your source code repository. This approach ensures our software works-out-of-the-box, even without root permissions, and even on systems that do not have Perl installed. It further simplifies support because it is easy to set up test environments in our office identical to what the customer is using.

      G'day eyepopslikeamosquito,

      The business side of things is not really in my purview.

      To give a rough idea, think of some Perl module that wants minimum versions of Perl, a libxxx, and some RDBMS. If I wanted to install that module, the expectation is that I have sufficient technical nous to install the dependencies (but without requiring any in-depth knowledge of any of them).

      — Ken

Re: Out-of-the box Perl version - lowest common denominator
by thomas895 (Deacon) on Jan 15, 2021 at 06:41 UTC

    RHEL 7 (and thereby CentOS 7) is still in support for a while longer and has v5.16. I'd say that's pretty common, especially in business environments.

    -Thomas
    "Excuse me for butting in, but I'm interrupt-driven..."

      Keep in mind though that end of extended support for RHEL7 is this August (if I'm reading their timeline correctly) and they're already pretty much in the "nothing but critical/important security fixes" phase (unless you have an extended support subscription maybe).

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

        G'day Fletch,

        Thanks for this additional information. After a bit of digging around, it looks like RHEL8/CentOS8 will have Perl 5.26.3.

        I'm not sure how the dates affect us. I'll pass this on.

        For reference:

        — Ken

      G'day Thomas,

      That's interesting: perhaps we don't need to increase the minimum version. Thanks for the information.

      — Ken

Re: Out-of-the box Perl version - lowest common denominator
by atcroft (Abbot) on Jan 16, 2021 at 09:35 UTC

    At least for Linux (and some *BSD) based OS distributions, https://www.distrowatch.com/ lists versions of major included packages (including perl). If there is a particular distribution in use at the client location, then this might be of help.

    For the top 21 distributions viewed on their site in the past six (6) months, the perl version breakdown for the last two (2) (or so) releases is as follows:

    • 5.14.1 (Arch 2011.08.19)
    • 5.16.3 (CentOS 7.8.2003)
    • 5.22.1 (Zorin OS 12.4)
    • 5.24.1 (deepin 15.11, MX Linux 18.3)
    • 5.26.1 (elementary OS 5.1.7 (hera), elementary OS 5.0 (juno), Linuxfx 9.4, OpenSUSE 15.2, Puppy 9.0 (bionicpup), Zorin OS 15.3)
    • 5.26.3 (CentOS 8.2.2004)
    • 5.28.1 (antiX 19.3, Debian 10 (buster), deepin 20.1, Linux Mint 4-LMDE (debbie), MX Linux 19.3, Solus 4.0)
    • 5.30.0 (Kali 2019.4, KDE Neon 20210114, KDE Neon 20201231, Linuxfx 10.7.105, Linux Mint 20.1 (ulyana), Pop!_OS 20.04, Puppy 9.5 (fossapup), Ubuntu 20.04 LTS (focal), Ubuntu kylin 20.04 (focal))
    • 5.30.1 (Endeavour 2019.12.22, Solus 4.1)
    • 5.30.2 (Fedora 32)
    • 5.30.3 (Kali 2020.4, Pop!_OS 20.10, Ubuntu 20.10 (groovy), Ubuntu Kylin 20.10 (groovy))
    • 5.32.0 (antiX bullseye-alpha1, Arch current, Debian unstable (sid), Debian testing (bullseye), Endeavour 2020.09.20, Fedora rawhide, Fedora 33, Manjaro stable, Manjaro 20.2.1, OpenSUSE tumbleweed, Ubuntu snapshot (hirsute))

    Hope that helps.

      G'day atcroft,

      I really appreciate you taking the time to extract this information from that site. Thankyou very much; it certainly will be useful.

      I had a bit of a poke around in that site and found other useful items (unrelated to the OP question). I've bookmarked DistroWatch; it looks like it could be useful in the future.

      — Ken

        My CSV is based on https://distrowatch.org and I agreed with them a way to automate the extraction process (as in: they agreed with me on a way to milk their site).


        Enjoy, Have FUN! H.Merijn

      I wonder if there's something similar for those of us who get to use older Perls on non-Linux systems? Solaris, HP/UX, and some fruit based thing are still a thing.

      I've also just looked at RiscOS; thinking about it for my RPi.

      Addendum RiscOS ships with Perl 5.8.8.

      Chronicler: The Domici War (domiciwar.net)

      General Ne'er-do-well (github.com/LeamHall)

Re: Out-of-the box Perl version - lowest common denominator
by GrandFather (Saint) on Jan 15, 2021 at 07:54 UTC

    In a *nix environment does a system Perl matter for your purposes? Wouldn't it be better to simply supply or suggest a recommended system independent Perl context? On Windows it doesn't matter so much as there isn't a system Perl. So a PerlBrew mediated environment seems like a good option.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
      Perhaps. If you have the luxury of knowing that all your potential users have both the knowledge and the motivation to build their own Perl. Personally, I (and I presume the OP) am not prepared to assume this to be the case, so I write my code on the assumption that it will be run using the system Perl, whatever version that might be.
      A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Out-of-the box Perl version - lowest common denominator
by Anonymous Monk on Jan 15, 2021 at 07:24 UTC
    I always thought you should go by features you need...

      That's a reasonable comment and we did look at features. There's nothing essential; e.g. we don't need support for a particular module, Unicode version, etc. Newer versions do have nice-to-have features — for instance, indented heredocs certainly make code look cleaner — but we can develop without them. Bug fixes, optimisations, and the like, are definitely welcome (but their absence is not a show-stopper).

      — Ken

Re: Out-of-the box Perl version - lowest common denominator
by Anonymous Monk on Jan 15, 2021 at 07:37 UTC

      Thanks for the report, AM.

      — Ken

Re: Out-of-the box Perl version - lowest common denominator
by perl-diddler (Chaplain) on Jan 17, 2021 at 08:00 UTC
    I have a question -- why are you wanting to change the minimum? Is there something in particular that is broken? Or is there some specific benefit you are wanting that a later version provides?

    I hear you are running on 5.16.0 now (might at least move to 5.16.3 and get some bug fixes if you stay at 5.16). Right now, among your customers, your "L.C.D." is 5.16.0 by virtue of the fact that you know that is working. Out of all your customers, one might assume some don't care (about software, or perl, whatever is on their computer, and only upgrade when they have to). The don't care contingent probably have whatever someone put on their machine(s) when they needed something.

    So I guess I'm wondering what you are looking to achieve or what are you hoping to get as benefits by upgrading? It sorta sounds like you are thinking about upgrading just "cuz", but I am not sure. If your reasons for upgrading are to have a later-shinier perl, you need to balance that against what will be required to upgrade the "don't care" contingent from wherever they are at now (at least at 5.16.0).

    Do your clients use the perl on their machines for anything else? I.e. if they run anything else that requires or uses perl will the other SW work seamlessly with a newer version? If you want to use a new feature of a newer perl, you need to balance that with the probability that such a feature may not be available in any version lower than the one you choose. I.e. if you use a perlI/O feature that allows you to write output to a string, you are locking yourself out of people using a default 5.6.x (likely not an issue, but an illustration of the point). In fact, if you use a specific feature, you might want to ensure it is still in the perl you switch to. Similarly, if you switch to a specific version to get a specific feature, you might want to see when it was introduced and what older versions might not be compatible.

    If you haven't checked them out, you might want to peruse the perl5xxxdelta manpages/perldocs. At the very least, the 5160 5180, 5200 .. up through perl5320delta should show the main difference between the major releases. The minor releases like 5.16.1, 5.16.2, 5.16.3, theoretically are bug-fix releases and shouldn't create major changes, but that is in theory.

    So in addition to just going with what is 'out there', you might want to ask why you are wanting to upgrade and ensure the new version meets your criteria while not dropping support for anything you are using now.

    If any of the machines affected are directly on the internet (vs. some internal net) you might look at security probs in perl and if they might affect you, what version they were fixed in, but it sounded like you were talking about internal machines.

    Anyway, I can't really say what version you should go with -- just make sure you need it and are going to get some definite benefits as a result of the switch.

    On my network facing linux box, I'm still running 5.16 as well (though 5.16.3), though I do have up to 5.28.2 available on my system for testing. It's just that I know that any upgrade above 5.16.3 is very likely to bring some incompatibilities to some of my system scripts, and that's another headache I don't need right now. That said, most of my scripts and libraries also run on my desktop windows+cygwin environment where I have 5.26.0 installed, but perl isn't so critical on my windows box as it is on my linux box.

    Good-luck!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11126941]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2021-04-22 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?