CPAN is the Comprehensive Perl Archive Network, and it's a huge repository of perl modules covering an enormous array of computing needs. It's an amazing resource and one of the best features of perl.
The client side is the cpan command, which can find and install requested modules, and it knows about and offers to install dependencies:
# cpan
cpan shell -- CPAN exploration and modules installation
cpan> install HTML::Foo
I'm taking a look at the RT ticketing system, and it has a long list of requirements. This is exactly what CPAN was meant for. But as I installed package after package, it kept trying to install the junoscript-perl package each time. Huh? This package is used for talking with Juniper routers, and is reportedly excellent, but I'd not requested it. Hmmm.
We do use Juniper routers, so perhaps this is stuck in a cache somewhere, so I looked all over the system and killed any reference to junoscript. It kept coming back. WTF?
Several hours later I figured it out: in addition to the shell version, one can launch an install directly on the command line, and I'd been using:
$ cpan install HTML::Foo surprise!
Well guess what: install is not a keyword on the command line, it's the name of a package or module, and cpan located a package in its directory that provides the install module. This directory is found in the .cpan/sources/modules/02packages.details.txt file, and it contains:
...
INSPEC::BibTeX 0.01 V/VP/VPLA/INSPEC-0.01.tar.gz
INSPEC::Retriever 0.01 V/VP/VPLA/INSPEC-0.01.tar.gz
install undef J/JU/JUNOS/junoscript-perl-6.4I0.tar.gz
integer 1.00 N/NW/NWCLARK/perl-5.8.6.tar.gz
interface 0.02 S/SW/SWALTERS/interface-0.02.tar.gz
...
So junoscript is providing an install module, and this is what I was asking for. Over and over. For hours. The proper syntax is:
$ cpan HTML::Foo correct
This was technically my fault — I used the wrong syntax — but this is a clear violation of the Principle of Least Astonishment, and I can't believe how frustrating this was. A bit of google shows that I'm not the only one who's had this problem either.
Why isn't this a keyword, or at least have the install module removed from Junoscript?