in reply to Re^2: How to upgrade local module using -MCPAN?
in thread How to upgrade local module using -MCPAN?
Update: chromatic confirmed my suspicion that CPAN is a core module. I won't bore you with a descrition of the tortuous path that led me to doubt this and then write the blather below about installing CPAN.pm from scratch; it'll suffice to say that it is besides the point.
Well, in that case what you want to do is pretty much what -MCPAN will do right out of the box, at least for Unix-like systems (which the only kind I have experience with; keep this in mind as you read what follows).
Of course, first you need to install CPAN.pm itself, and to be honest, this is one of those things, like making sourdough bread, where one seeds the process once and then each subsequent iteration is based on the results of the previous one. Similarly, once one installs CPAN.pm the first time, it takes care of all subsequent installations of new versions of itself. This is a long way of saying that it has been a very long time since I had to install CPAN.pm on a system that didn't already have some version of CPAN.pm installed. I guess that you will have to download the CPAN.pm distribution file and follow the standard
sequence from within the directory where you unpacked the CPAN.pm distribution.perl Makefile.PL make make test make install
On my system (a Debian Linux box), the main configuration file for CPAN.pm lives in /etc/perl/CPAN/Config.pm. There are a whole bunch of options that can be specified in this file. I will have to refer you to the docs for the details: CPAN.
Once you have CPAN.pm installed and properly configured, then just run
or simply invoke the cpan script (which should have been installed in your PATH). Just make sure that you have sufficient privileges to write to the global directories. In fact the lines above may need to be something like% perl -MCPAN -e shell
or simply% sudo perl -MCPAN -e shell
Once inside the CPAN shell, just use the install to install whatever you want:% sudo cpan
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to upgrade local module using -MCPAN?
by Anonymous Monk on May 26, 2005 at 14:51 UTC | |
by tlm (Prior) on May 26, 2005 at 15:14 UTC |