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

When CPAN shell cannot find a module

Thread Next
From:
James E Keenan
Date:
November 20, 2005 11:51
Subject:
When CPAN shell cannot find a module
Message ID:
20051120195142.25271.qmail@lists.develooper.com
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.  I checked it out at 
search.cpan.org and decided to install it.  Here is an edited transcript 
of my shell session:

##### START from CPAN shell session #####

cpan> install PathTools
CPAN: Storable loaded ok
Going to read /Users/jimk/.cpan/Metadata
   Database was generated on Fri, 18 Nov 2005 22:50:02 GMT
Warning: Cannot install PathTools, don't know what it is.
Try the command

     i /PathTools/

to find objects with matching identifiers.

cpan> i/PathTools/
Unknown command 'i/PathTools/'. Type ? for help.

cpan> i /PathTools/
Distribution id = K/KW/KWILLIAMS/PathTools-3.14.tar.gz
     CPAN_USERID  P5P (The Perl5 Porters Mailing List 
<perl5-porters@perl.org>)
     CONTAINSMODS File::Spec::Win32 File::Spec::Epoc File::Spec 
File::Spec::Unix File::Spec::OS2 File::Spec::VMS File::Spec::Functions 
File::Spec::Cygwin File::Spec::Mac Cwd

[1st guess:  File::Spec::VMS]

cpan> install File::Spec::VMS
File::Spec::VMS is up to date.

[Oops, that didn't work! ]

cpan> install File::Spec::Cygwin
File::Spec::Cygwin is up to date.

[Oops, that didn't work! ]

cpan> install File::Spec::Epoc
File::Spec::Epoc is up to date.

[I noticed that File::Spec's version is the same as that of this new 
PathTools -- 3.14 -- and decide to guess that. ]

cpan> install File::Spec

[Success at last! ]

Running install for module File::Spec
Running make for K/KW/KWILLIAMS/PathTools-3.14.tar.gz
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
   http://www.cpan.org/authors/id/K/KW/KWILLIAMS/PathTools-3.14.tar.gz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
   http://www.cpan.org/authors/id/K/KW/KWILLIAMS/CHECKSUMS
Checksum for 
/Users/jimk/.cpan/sources/authors/id/K/KW/KWILLIAMS/PathTools-3.14.tar.gz ok
Scanning cache /Users/jimk/.cpan/build for sizes
PathTools-3.14/
PathTools-3.14/Build.PL

[and everything is cool from here on]


##### END from CPAN shell session #####

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.

Jim Keenan

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About