in reply to Backward compatible lexical warnings

To be honest, is there really a need to worry about this? Do you have active users who are not upgrading perl to 5.6 or 5.8, but are upgrading your module?

You're missing out not just on important safety for yourself as you develop, you're also missing out on some handy syntactical sugar (our, lexical filehandles, POSIX character classes in regexes, better utf8 support, etc.). I would suggest polling your existing community, if any, to see what their perl levels are, and see if there would really be any concern with just moving up to 2001 (perl 5.6.1) or, better, 2003 (perl 5.8.1). You may be giving yourself headaches for no reason.

Update: Added italics. I'm not proposing that organisations change perls with each minor release. However, perl 5.6 is already antiquated by computing standards. That's about the time that Java 1.3 was out - as far as I'm aware, not only is it not supported anymore, but most people seem to have moved on to Java 1.4 already (which is probably newer than Perl 5.8.0). Why does perl get special treatment here?

  • Comment on Re: Backward compatible lexical warnings

Replies are listed 'Best First'.
Re^2: Backward compatible lexical warnings
by xdg (Monsignor) on Aug 30, 2006 at 23:04 UTC
    To be honest, is there really a need to worry about this?

    Usually, no. But several of the modules I've written are intended as very low-level building blocks and thus I want them to be backwards compatible as far as possible in case other authors want to or need to write something to run on an ancient version of Perl. (E.g. Class::InsideOut, Test::Number::Delta)

    Generally, I try to avoid using handy syntactical sugar if I don't need to. For example, if my only use of our is to specify the module's $VERSION, then I don't feel that little bit of sugar is really worth breaking my module on older Perls.

    Side note: I found it interesting to run Perl::MinimumVersion on some of my code. There are often very simple and easily avoided things that prevent backward compatibility if that's important.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re^2: Backward compatible lexical warnings
by Anonymous Monk on Aug 30, 2006 at 21:31 UTC
    To be honest, is there really a need to worry about this? Do you have active users who are not upgrading perl, but are upgrading your module?

    Upgrading perl to the next stable release means re-testing every single program you have in production, to find out what this release breaks. It's not something an organization does every day.

    Downloading the lastest version of a new module is what people do by default. It is something an organization does every day.

    I think his concerns are valid.

      Upgrading perl to the next stable release...

      There have been ten stable releases of Perl since 5.6.0. I don't believe that anyone who hasn't upgraded to a Perl released this millennium has a serious desire to install the new version of a module.

        I don't believe that anyone who hasn't upgraded to a Perl released this millennium has a serious desire to install the new version of a module.

        As opposed to some version of Perl released in some *other* thousand year time period?

        Was there some Perl release in 1006 that I'm not aware of?