develooper Front page | perl.module-authors | Postings from November 2005

Re: When CPAN shell cannot find a module

Thread Previous | Thread Next
November 21, 2005 00:08
Re: When CPAN shell cannot find a module
Message ID:
>>>>> On Sun, 20 Nov 2005 14:51:42 -0500, James E Keenan <> said:

  > I'm wondering if my diagnosis of the following annoying problem is correct.
  > When I use the CPAN shell to install a distribution which does not
  > include a package with the name of the distribution, the shell
  > immediately tells me to use the 'i /distroname/' to find objects with
  > matching identifiers.

  > If information on the distribution is located, then I have to guess as
  > to which module within the distribution is one that I don't have
  > up-to-date and which will therefore trigger the shell to proceed with
  > installation.

  > Example:  Just now I saw on perl.cpan-testers that Ken Williams had
  > uploaded a distribution named PathTools.

As you did know the authors name, you could have asked immediately

  cpan> ls kwilliams

and would have got the exact distribtion name:

  112124 2005-11-18 KWILLIAMS/PathTools-3.14.tar.gz

From there you would have just said

  cpan> install KWILLIAMS/PathTools-3.14.tar.gz

and would have got it.

Alternatively (my favorite) you could have used the 'r' command and it
would have reported something like this:

Cwd                            3.05      3.14  K/KW/KWILLIAMS/PathTools-3.14.tar.gz

and then an 'install Cwd' would have had success.

  > I checked it out at and decided to install it.
  > Here is an edited transcript of my shell session:

  > [...snip...]

  > So I eventually get the shell to work ... but I really don't see why
  > it couldn't handle 'install PathTools' right from the get-go?

  > Anyone know why?  Is there a workaround?  Thanks.

CPAN shell is very cautious not to install the wrong thing. It wants
to be absolutely sure that it installs the thing that you wanted. Witness:

  cpan> install /^Cwd$/
  Sorry, install with a regular expression is not supported

I don't think many people would appreciate getting something installed
they didn't explicitly ask for.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About