Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Maddingue (5320)

Maddingue
  (email not shown publicly)
http://maddingue.org/

Journal of Maddingue (5320)

Wednesday October 18, 2006
07:26 PM

Working with old Perls

[ #31353 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.