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

Hi, Monks, I'm hoping somebody else has also run into this problem.

We're maintaining a local CPAN repository for our in-house software and to control versions of regular CPAN modules. For our main application ("mercury") we've created a CPAN bundle called Bundle::Mercury listing all the modules we want installed when the mercury application is installed on a box. That much works fine the first time.

But now we're adding a new module to the list in the bundle and we've upgraded the version number on the bundle from 0.07 to 0.08. We'd like to be able to say "install Bundle::Mercury" and have it read the new module list from v0.08 in our CPAN repository, but what it does is read the *old* module list from the old Bundle/Mercury.pm file stored on disk. The only way to get CPAN to read the new bundle list seems to be deleting the old file on the local disk.

Is anybody else in the same situation and making it work?

Replies are listed 'Best First'.
Re: CPAN bundle versions
by samtregar (Abbot) on Mar 15, 2005 at 23:37 UTC
    I can't say I've ever seen this problem. Are you using the latest version of the CPAN.pm module? Does the module info command give you any hints? Does it help if you blow away your .cpan directory?

    -sam

      > Are you using the latest version of the CPAN.pm module?

      Yep, 1.76.

      > Does the module info command give you any hints?

      It says it sees new version, and acknowledges that the installed version is old,

      Bundle id = Bundle::Mercury
          CPAN_VERSION 0.08
          CPAN_FILE    ALL/Bundle-Mercury-0.08.tar.gz
          MANPAGE      Bundle::Mercury - Modules required for mercury application
          CONTAINS     Term::ReadKey ...<snip>
          INST_FILE    /home/kgoess/.cpan/Bundle/Mercury.pm
          INST_VERSION 0.07
      
      but immediately after running that command, running "install Bundle::Mercury" pulls in the old module list from v0.07.

      > Does it help if you blow away your .cpan directory?

      Yes, in fact all we need to do is delete .cpan/Bundle/Mercury.pm and it pulls in the new bundle and module list.

      Running the process through the debugger suggests that it's a bug/feature in CPAN.pm, first it gets the bundle information from the network version, then a few lines later it gets the bundle information from the local file.

        Well it certainly doesn't sound like a feature to me! I think you should report it to the author of CPAN.pm as a bug. The module seems to be updated quite frequently which implies that bugs are being fixed regularly.

        -sam