Working with old Perls

Maddingue on 2006-10-18T23:26:15

Many people don't like this subject, and their sole reaction is to replace each and every installation of old Perl with a recent one. Although I would like to be able to do this where I work, I can't. Therefore I have to deal with old Perl versions: 5.6, 5.005 and even 5.004.

For most of my work, it's not a big deal in fact, but when I have to use CPAN modules, I usually need to tweak them a little so they can work on these old Perls (and send on RT the corresponding patches). Recently, I sent one to Jesse Vincent regarding HTTP::Server::Simple. The main thing that bothered him was the fact that the patch removed the warnings pragma from the code.

Then I wondered once again why nobody had written an emulation module so that one can "use warnings" on Perl before 5.6. It's not that complex by using the $^W variable. Sure, it's not lexical and can't provide all the features the real pragma has, but it can be good enough for 90% of the modules out there.

Therefore I decided to JFDI and uploaded warnings-compat on the CPAN. It works on Perl 5.004_05, but I think it can even work on earlier Perls, probably even down to 5.000.


Fantastic!

chromatic on 2006-10-18T23:31:30

I had thought of doing this, but didn't. Thank you for doing it!

Thanks. Applied.

jesse on 2006-10-19T03:38:51

HTTP::Server::Simple now supports 5.004 :)

Thanks!

Acme::MetaSyntactic too!

BooK on 2006-10-19T14:50:11

Guess what?! Acme::MetaSyntactic will support older Perls as from version 1.00.