The past is not a blast

Debugging things on an older version of Perl can be a pain. I like to be able to replicate bug reports whenever I can and verify that my fixes resolve the problem. That means that first, you have to build them if you don’t have them and many or most of the older perl tarballs won’t build on a modern Debian-based system like Ubuntu.

To help out anyone else that needs to do this (and to help my future self), I have over time created maintenance branches for every major release of perl from 5.6.1 to 5.8.8 in my perl github repo. You may need some extra fiddling to make some things build or keep them from building, but it should get you a lot closer. For example, on perl 5.6.1, you need to disable DB_File with a -Ui_db to Configure.

Second, you may need to get the toolchain working on the old perl to deal with dependencies. I have a couple pieces of advice there:

  • Don’t run perl via a symlink. If you have multiple perl interpreters in your PATH, your Makefile might wind up targeting the first perl in the PATH instead of the one you used to run Makefile.PL
  • Install ExtUtils::MakeMaker by hand as the very first thing you do. This will definitely help your bootstrapping.

That’s my wisdom gained from a couple hours lost tonight. I hope it saves someone else some time.