Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Shlomi Fish (918)

Shlomi Fish
  shlomif@iglu.org.il
http://www.shlomifish.org/
AOL IM: ShlomiFish (Add Buddy, Send Message)
Yahoo! ID: shlomif2 (Add User, Send Message)
Jabber: ShlomiFish@jabber.org

I'm a hacker of Perl, C, Shell, and occasionally other languages. Perl is my favourite language by far. I'm a member of the Israeli Perl Mongers, and contribute to and advocate open-source technologies. Technorati Profile [technorati.com]

Journal of Shlomi Fish (918)

Friday November 30, 2007
07:38 AM

A Blast from the Past - perl-5.005

[ #35014 ]

After uploading Error-0.17010, I received several installation failures from testers who tested using perl-5.005. I wanted to simply deprecate perl-5.005, but I talked with my co-maintainer to see what he thinks about it. From what I understood, he wanted me to fix the problems that caused the failures on perl-5.005 and then to upload it again to see if it helps.

I didn't want to upload something without making sure the tests pass, because otherwise it will take a while to get it working. So I decided to install perl-5.005.

After downloading perl-5.005, the first thing I noticed was that running "make" failed immediately. This was due to a gcc-4.2 regression which can be fixed using this fix. Apparently it also affects more recent versions of perl5.

After applying the fix, everything compiled, and "make test" passed.

Error.pm requires Scalar::Util so I had to build it. As it turns out "perl5.005 Makefile.PL" does not work there properly for some reason, while "perl5.005 -d Makefile.PL" (and then "c" in the debugger) works fine.

Retrospectively I learned that it requires an up-to-date Test::Harness.

Error.pm also made use of the warnings module so I need to install warnings-compat. This in turn required Test-More, which is part of the Test-Simple distribution. This in turn required Test-Harness so I had to install Test-Harness-2.64, whose building worked. Then I backtracked until I had everything installed.

Now to Error.pm. I changed an open I, ">", "Changes" to open I, ">Changes". However, it still didn't work. There's one bug in the script 05text-errors-with-file-handles.t which works fine in perl-5.8.8. There were also failures in a script that my co-maintainer originally wrote, which I didn't understand.

So after all this work, I gave up. I told the co-maintainer that if he wanted to have Error working with perl-5.005, he should do the work himself. Otherwise, I'll just bump the minimum version to perl-5.6.x.

Triaging Error.pm with perl-5.005 made me realise how much the more modern perls are better to work with. I pity the people who still have to work with such old versions of perl.

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.
  • You should run Perl::MinimumVersion over that code, you shouldn't ever "use warnings" on anything that you want to be 5.005 compatible.

    Just put $^W = 1; in your test scripts to make sure warnings are on during tests.