blazar has asked for the wisdom of the Perl Monks concerning the following question:

I'm merely reporting here a question that was asked (link @ GG) in clpmisc by Joseph Brenner - the question is very interesting for me too and it hasn't received answers yet. I do not claim any authorship on the following, just added some cosmetic formatting...


I'm getting my laptop (AMD64 based) set-up with the latest version of Kubuntu (7.10 Gutsy Gibbon), and I'm trying to do something that doesn't seem to me like it should be terribly complicated, but I'm running into some funny problem I'm not seeing:

  1. I've created a custom Bundle of perl modules installed on my workstation, using CPAN.pm's "autobundle" command.
  2. I've installed a "minicpan" copy on my laptop, using the minicpan command included with the CPAN::Mini module.
  3. I want to configure CPANPLUS or CPAN so that it can be used to install my Bundle, working from the packages in the minicpan mirror.

I would've thought that all I need to do is to stick the full path to the minicpan inside of the "urllist" in ~/.cpan/CPAN/MyConfig.pm.

I keep having funny problems with the CPAN shell trying to install the wrong version from the minicpan mirror, I gather because it's using an stale meta data from the ~/.cpan location rather than getting it from the mirror location.

Anyway, if anyone's done anything like this before, I'd appreciate some hints on what you did (perhaps a copy of your MyConfig.pm).

And if anyone's really interested, I can try to type up a more thorough listing of what I've done and the error messages I've seen, and so on.

Replies are listed 'Best First'.
Re: minicpan, CPAN/CPANPLUS and autobundles on linux
by jasonk (Parson) on Nov 25, 2007 at 00:48 UTC

    If the problem really is just stale metadata, then you can fix it simply by running reload indexes to flush the metadata before you run the install.

    The more likely explanation however, is that the machine you built the autobundle on was not running the latest version of those modules. When you use autobundle to create a bundle, the bundle includes version information for all the modules that versions could be determined from. When you try to install the bundle, it will try to match these version numbers. Since the intent is for an autobundle to be able to exactly replicate the environment from one machine to another, it makes sense to match the version nubmers. On the other hand, minicpan just gets the latest version of each module, which leads to this problem.

    The easiest way around this is to remove the version information from the autobundle before trying to install it.


    We're not surrounded, we're in a target-rich environment!