I would like to report some bizarre behavior I observed when I
accidentally used the wrong syntax when using the 'cpan' command-line
utility. The environment is Darwin (Mac OS 10.3), Perl 5.8.4.
According to the documentation, the correct way to install a module
using the command-line utility is:
$ cpan module_name
If instead I had simply called
$ cpan
the cpan shell would have been activated, and I would then install a
module as follows:
cpan>install module_name
Recently I confused the two when trying to install CPAN module
List::Utils. I called
$ sudo cpan install List::Utils
Note the extraneous 'install'. After providing my password, the
output was at first as expected:
CPAN: Storable loaded ok
Going to read /Users/jimk/.cpan/Metadata
Database was generated on Fri, 20 Aug 2004 22:05:12 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
Going to read /Users/jimk/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz
Going to read /Users/jimk/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Tue, 07 Sep 2004 13:05:17 GMT
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz
Going to read /Users/jimk/.cpan/sources/modules/03modlist.data.gz
Going to write /Users/jimk/.cpan/Metadata
Running install for module install
Then, all of a sudden, cpan started to install a *completely
different* module ... something called 'junoscript-perl-6.4I0' that I
had not requested or even heard of.