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

Good day to all! I'm about to start writing a few scripts and modules for Yet Another Project on my plate, and wanted to get some advice from others on what version of Perl they currently target (today).

Most of the modules will be OOP related, so it's a matter of use vars vs. our and #!/usr/bin/perl -w vs. use warnings for me. Most of my Perl learning started with 5.6.x installs, while my 5.00x exposure is simply due to base installs on FreeBSD/Linux servers.

On my *mumble* Windows workstation, I have ActiveState Perl v5.6.1, on one FreeBSD server I have Perl v.5.6.1, and on the live FreeBSD server I have v5.005. I'm not to keen on upgrading the live boxen to 5.6.1, since I would have to reinstall a fair amount of modules, and hence a lot of testing.

So, my questions are many fold:

  1. Assuming I stick with 5.005 on the live box, but are developing under 5.6.1 elswhere, is there a good set of docs (in addition to the perldeltas) about developing downward?

  2. Is there a list somewhere on what versions currently ship with the major operating systems?

  3. Depending on the question above, is it time to cast aside 5.005 for new development? What is the audience developing for currently? 5.00x, or 5.6.x?

I know some of this comes down to "what is your target audience", if there will even be one. But I'd hate to paint myself into a corner for no particular reason.

-=Chris

Replies are listed 'Best First'.
Re: Target version: 5.00x or 5.6.x?
by broquaint (Abbot) on Jul 26, 2002 at 15:12 UTC
    Having been in a similar situation to yourself (5.00x vs 5.6+) I'd say target the former. While you get a few syntactic niceties (lexical filehandles, use warnings etc) there's not a great of difference between the two in terms of language. Your programs won't benefit hugely from 5.6+ so you might as develop for the lowest common dominator (which isn't even that low in this case). And besides our() is horrid.
    HTH

    _________
    broquaint

Re: Target version: 5.00x or 5.6.x?
by IlyaM (Parson) on Jul 26, 2002 at 15:24 UTC
    1. Never heard about such docs. Anyway in my experience perldeltas are not sufficient. I have quite good understanding of what is allowed in old Perls but still I've biten a couple of times by bugs in old Perls. I.e. being developing on 5.6.1 and using 5.005 supported syntax I found my code to don't work on 5.005 because of bugs in this version. The only way to ensure compatibility is having 100% coverage tests and run them on all supported versions of Perl.
    2. I think most Linux distros have 5.6.1, FreeBSD still at 5.005 (though it is possible to get 5.6.1 from port). Commercial Unices are very conservative. I've heard some of them still bundle Perl 4! So I think most their users install Perl themselves anyway.
    3. Really depends on your target audience. If it is your internal project to be used in, say, inside your company than it probably is not hard to require specific version. On the other hand company I'm working for right now has a Perl project our customer explictly requires 5.004 (!) compatiblity. Shortly speaking it is a plugin for customer's shopping cart targeted for wide audience. When I've beeing discussed Perl version requirements for this software they said they still have a lot of support calls from users with this version of Perl. Requiring even 5.005 means lost money.

    --
    Ilya Martynov (http://martynov.org/)

Re: Target version: 5.00x or 5.6.x?
by Abigail-II (Bishop) on Jul 26, 2002 at 16:26 UTC
    And what about 5.8.0? ;-)

    It not only depends on what you your target audience is, but also on what you want to do. Threading was seriously broken on 5.005, it got better in 5.6, but in 5.8 we take huge leaps forward. It's the same when it comes to Unicode. If you want a crossplatform fork(), you need 5.6. There's much more 64bit support in 5.6 than 5.005. Large file support in in 5.6, not 5.005. And then there's a whole flock of smaller additions to 5.6.

    Abigail

Re: Target version: 5.00x or 5.6.x?
by dws (Chancellor) on Jul 26, 2002 at 16:20 UTC
    I'm not to keen on upgrading the live boxen to 5.6.1, since I would have to reinstall a fair amount of modules, and hence a lot of testing.

    Upgrades aren't fun, but staying behind the times means taking on a technical debt that grows as more and more stuff requires 5.6 or later. Soon you'll be the old guy down the street who still has a rotary phone. Don't let that happen. Upgrade. You'll be glad you did.