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 ]

bart (450)

Journal of bart (450)

Tuesday January 29, 2008
07:01 PM

The pain of updating Perl

[ #35516 ]

A few days I decided to upgrade ActivePerl on my laptop. Not the major upgrade to 5.10.0, not yet, I just wanted to have the new GUI version of PPM, just like I already had on my other computer. It's just a minor upgrade between builds of perl 5.8.8, from build 817 to build 822. That should be relatively painless... Not so.

Well, despite the fact that XS modules are binary compatible, the new build refuses to install on top of the older build. That means I'll have to uninstall perl, install the new version, and reinstall every module I had added. Ouch.

I remember having taken a Bundle snapshot with CPAN.pm over a year ago, and it wasn't pretty: installing that bundle resulted in CPAN.pm wanting to reinstall core modules. I didn't want to live through that again, besides, this being Windows, installing through CPAN would probably not be trivial for some modules. So this time, I was going to try to use PPM, and, preferably, automate it.

It's easy to get a list of modules installed with PPM, complete with version numbers into a file, with ppm query * or (is this new?) ppm list. (Oh, fun, apparently the output format has changed.).

But after that, I'm stuck. How the hell do you use that list to install those packages automatically? I'm stumped. I want to:

  • install modules I don't have yet, and
  • upgrade modules that are out of date.

Simple enough. But it looks like having PPM just do that by feeding it that list, simply isn't in the list of supported features.

So I ended up installing most of these modules by hand, list in hand. Well, I tried. It turned out some of the modules were still not properly installed. For example, Crypt::SSLeay was missing its DLL, and Win32::API just didn't work.

So now, days later, I'm still stuck with an incomplete set of reinstalled, and possibly broken, modules. I now just have to install additional modules when I find some script is broken. Oh, joy.

And then, there are still some modules (WWW::Mechanize and HTML::TokeParser::Simple) of which the API had changed, so, with freshly installed (and upgraded) modules, my scripts just didn't work any more. I've had to figure out what changed, and modify the script. Not fun.

I'm not looking forward to upgrading to 5.10.

p.s. I have some vague plans, if necessary, to write a shell script, controlling ppm through the command line, to install or upgrade the whole list.

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.
  • Yes, I know, it's a pain.
    I'm trying to work on that.
    Do you use Vista on your laptop?

    Can you give me some more information about what fails, error messages, and such?
    Do you think it depends on PPM/Activestate packaging? What compiler do you use?

    Sorry, many questions... :-)

    • I don't know exactly what failed, all I know is I had to reinstall Win32::API. I used PPM both times.

      I did have an additional problem when installing CAM::PDF [cpan.org], also with PPM. My virus scanner (Grisoft's AVG) didn't like the double extension of one of the scripts, ".pdf.bat", it block access to that file and it even when I clicked "it's OK to run this file", which interrupted installation of that module. Time and time again. Plus, it apparently broke off installation of the rest of the modules in the to do l
  • Do this or its equivalent.

    perldoc -t perllocal \
      | perl -lne 'print $1 if /"Module" (\S+)/'
      | xargs -n 1 cpan
    • Good idea, except for one detail: the module list is not the list from this installation of perl, but of the previous one, that has already been deleted. So it needs to be a multi-step process:
      1. save the module list to a file
      2. reinstall perl
      3. run the rest of your oneliner using that file as its input