in reply to CPANPLUS won't install distros by name (e.g. Scalar-List-Utils)

Nice detective work, wu-lee. Thanks.

Personally, I would prefer to keep things logically straight and use distribution names inside cpanp, since I'm installing the whole distribution and not just a particular module from the distribution. However, everyone seems to use the package names instead, which seems confusing to me (especially since a distribution can (and often does) contain more than one package).

  • Comment on Re: CPANPLUS won't install distros by name (e.g. Scalar-List-Utils)

Replies are listed 'Best First'.
Re^2: CPANPLUS won't install distros by name (e.g. Scalar-List-Utils)
by wu-lee (Beadle) on Nov 10, 2009 at 12:22 UTC
    Hello, anonymous, are you the author by any chance?

    I've not yet had the time to properly figure out how exactly CPANPLUS knows about package dependencies, but I think it's using 02packages.details.txt.gz (it is at least mentioned in there). Doesn't that give the required information to map a authorless and versionless distribution name to at least the most recent full distribution name?

    For now I'm using Parse::CPAN::Distributions to get the latest author and version from the bare distribution name, and giving that to CPANPLUS. (Both author and version are needed, even for the latest version.) That seems to do the trick, although it's slow to download the find-ls data.

    Perhaps CPANPLUS could do the same, either using P::C::D as I do, or by inspecting 02packages.details.txt.gz or find-ls itself?

      Sorry -- didn't mean to imply that I was the author. I'm just appreciative of your efforts here. (Gah... I really should create a proper user account here at the monastery.)

      Looking at zless ~/.cpanplus/02packages.details.txt.gz, it seems like that indeed provides the connection between package name and distribution name.