]> sipb.mit.edu Git - wiki.git/blobdiff - doc/cpan.mdwn
Revert "add rush events"
[wiki.git] / doc / cpan.mdwn
index fe93f8f65480b5d144ac6fb7e5666872492bdf28..9e56c74745a7fed14b053d043e0208c1a71cc884 100644 (file)
@@ -2,7 +2,7 @@
 
 If you're mostly familiar with this document, and just want the incants, skip to the <a href="#cheatsheet">cheat sheet</a>.
 
-[CPAN](http://cpan.org) is the "Comprehensive Perl Archive Network", a repository of useful Perl modules. Most projects written in Perl depend on at least one module from CPAN, and dependency graphs of dozens of modules are not uncommon. Unfortunately, installing CPAN modules can be somewhat tricky, in part due to the age of many of the tools involved. This document is designed to help someone who is not a Perl programmer learn how to get a CPAN module or set of modules installed with a minimum of pain.
+[CPAN](https://cpan.org) is the "Comprehensive Perl Archive Network", a repository of useful Perl modules. Most projects written in Perl depend on at least one module from CPAN, and dependency graphs of dozens of modules are not uncommon. Unfortunately, installing CPAN modules can be somewhat tricky, in part due to the age of many of the tools involved. This document is designed to help someone who is not a Perl programmer learn how to get a CPAN module or set of modules installed with a minimum of pain.
 
 ## Is it in my distribution?
 
@@ -26,7 +26,7 @@ You should now be able to install a package with `install Package`.
 
 If you don't have root access, just want to install packages for your own use, or want to install packages into AFS for use from multiple systems, you want [`local::lib`][local::lib]. (It's possible to configure CPAN to do this by hand, but trust me, `local::lib` is easier).
 
- * Grab the latest `local::lib` tarball from CPAN (As of this writing, that's version [1.8.4][lltgz])
+ * Grab the latest `local::lib` tarball from CPAN (As of this writing, that's version [1.008004][lltgz])
  * Unpack the tarball and run
 
         perl Makefile.PL --bootstrap=/path/to/install/
@@ -36,14 +36,14 @@ You can now run `perl -I/path/to/install/lib/perl5/ -Mlocal::lib` to get a fragm
 
 For more details, such as how to manage multiple different `local::lib` installations, see `local::lib`'s [documentation on CPAN][local::lib]
 
-[local::lib]: http://search.cpan.org/~apeiron/local-lib/lib/local/lib.pm "local::lib"
-[lltgz]: http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-1.008004.tar.gz
+[local::lib]: https://search.cpan.org/perldoc?local::lib "local::lib"
+[lltgz]: https://www.cpan.org/modules/by-module/lib/local-lib-1.008004.tar.gz
 
 ## Automatically installing dependencies
 
 By default, CPAN prompts you whether or not to follow dependencies when installing a package. This is not usually what you want -- if you want a specific package, you don't care what CPAN has to install to get it to you, so it should do so automatically. There are two steps required to get CPAN to do this:
 
- * Set `prerequisites_policy` to `follow` inside CPAN (`o conf prerequisites_policy follow` and then `o conf commit`)
+ * Within the CPAN interactive shell (run `cpan`), Set `prerequisites_policy` to `follow` (`o conf prerequisites_policy follow` and then `o conf commit`)
  * Set the environment variable `PERL_MM_USE_DEFAULT` to `1`.
    e.g. run `cpan` as
 
@@ -52,7 +52,7 @@ By default, CPAN prompts you whether or not to follow dependencies when installi
 
 ## Gotchas using CPAN on Athena
 
- * For whatever reason, perl believes itself to be smarter than your operating system by default, and checks permissions by looking at the permission bits on files, rather than using `access(2)`. (See [filetest] (filetest) on CPAN). Furthermore, when installing modules, CPAN checks to see if you have write permissions on the destination, and aborts if it doesn't think you do, without even trying. I have been unable to find a way to override either of these behaviors.
+ * For whatever reason, perl believes itself to be smarter than your operating system by default, and checks permissions by looking at the permission bits on files, rather than using `access(2)`. (See [filetest][filetest] in the Perl docs.) Furthermore, when installing modules, CPAN checks to see if you have write permissions on the destination, and aborts if it doesn't think you do, without even trying. I have been unable to find a way to override either of these behaviors.
 
   This is a problem in AFS for obvious reasons, since AFS does not use UNIX permissions. I happen to only need to install perl modules into lockers on which I am the owner; If you need to install things somewhere where the UNIX permission bits indicate you would not have access, you're out of luck as far as I can tell.
 
@@ -60,7 +60,7 @@ By default, CPAN prompts you whether or not to follow dependencies when installi
 
 I work around this for BarnOwl by having completely separate perl module installs for every AFS sysname we support. This is painful to maintain, but I've found it to be the most reliable option.
 
-[filetest]: http://search.cpan.org/~dapm/perl-5.10.1/lib/filetest.pm
+[filetest]: https://perldoc.perl.org/filetest.html
 
 
 ## Cheat-sheet
@@ -77,9 +77,9 @@ I work around this for BarnOwl by having completely separate perl module install
     cpan> install Some::Module
 
 ### Installing packages into a directory
-    $ wget http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-1.004009.tar.gz
-    $ tar xzf local-lib-1.004009.tar.gz
-    $ cd local-lib-1.004009/
+    $ wget https://www.cpan.org/modules/by-module/lib/local-lib-1.008004.tar.gz
+    $ tar xzf local-lib-1.008004.tar.gz
+    $ cd local-lib-1.008004/
     $ perl Makefile.PL --bootstrap=/install/dir/
     $ make && make install
     $ eval $(perl -I/install/dir/lib/perl5/ -Mlocal::lib)