Careless module dependencies

rob_au on 2003-03-04T03:13:31

Whilst working with with perl 5.005.03 at the moment, I have come across an annoyance with a number of modules on CPAN.

It appears that a number of modules include the use 5.006 directive (presumably as a result of creation using h2xs), setting the minimum level of Perl required for execution to be 5.6, without good reason. For the most part, the only 5.6 version specific features employed in most of these packages is the use of our declarations in place of use vars for package-wide variables.

Whilst I recognise that some modules, really do depend upon version specific elements of Perl (an excellent example of this is the only module with its use of an object within @INC), I see the use of mandates for specific versions of Perl something which must be done with great care.

What happened to the concept of backward-compatibility?


Backwards compatibility

acme on 2003-03-04T10:13:08

Well, it's a tricky subject. I don't think many people are still using perls that old, so it's all too easy to slip in common practices. For work code, where I control the environment, I use all sorts of 5.8-isms, but I'm careful with what I release to CPAN. However, if the patches are trivial, I'm sure the authors will accept them ;-)

Re:Backwards compatibility

ajtaylor on 2003-03-04T15:44:29

I'd have to disagree. :-) We're still running 5.005 at work, but only because a module we depend on (Apache::ePerl) wouldn't run under 5.6 and the person trying to apply the patch at the time couldn't get it to work. So we stuck with what worked. We also don't have enough tests in place yet to comfortable test everything with a newer perl.

Yes, we know we're behind the times. And for personal projects I control I use hosting services with 5.6.1. But I've also worked with a couple providers who had something REALLY ancient like 5.004.

Or...

belg4mit on 2003-03-04T14:17:33

On the flipside, I tend to try to want to keep backwards compatibility, but tend to write in
5.6 or 5.8 environments. I have no 5.005_3 around,
and occasionally some slightly different syntax
slips in that will break it. What might be nice
is a lint like parser that could look for known
non-backwards compatible constructs and alert you
about them, instead of requiring an author to have
an old binary lying around.