CPAN::Site - CPAN.pm subclass for adding site local modules
perl -MCPAN::Site -e shell
This is not even alpha software and will be made obsolete by CPAN.pm extensions/plugins some day.
This module virtually adds site specific modules to CPAN. The general idea
is to have a local (pseudo) CPAN server which is asked first. If the
request fails - which is the usual case, CPAN.pm switches to the next URL
in the list pointing to a real CPAN server. The pseudo CPAN server must
serve the files site/02packages.details.txt.gz and
site/01mailrc.txt.gz which contain the site local extensions to CPAN. You must make sure that
the pseudo server can satisfy the request for these files since a failure
will result in CPAN.pm trying to fetch the site/* files from all the real CPAN servers in your
urllist
.
The included mkpackages script can be used to generate the local 02packages.details.txt file. The script does scan the distribution files for package names an version numbers. Note that lines looking like VERSION specifications are evaluated!
The Makefile.PL will ask you for the URL of your pseudo CPAN server. This URL added to the front of the urllist of the CPAN.pm configuration when using this module. Note that rereading the configuraion from the CPAN.pm shell will cause this URL to be dropped. You must add it again using
cpan
><PRE> o conf urllist unshift
</PRE>
your-URL-here
in this case.
To use the module, generate your pseudo CPAN on a anonymous FTP, HTTP or NFS server:
mkdirhier ~wwwdata/htdocs/CPAN mkpackages ~wwwdata/htdocs/CPAN Then use C<-MCPAN::Site> instead of C<-MCPAN>
perl -MCPAN::Site -e shell
mkdirhier ~wwwdata/htdocs/CPAN/authors/id/ULPFR mv /tmp/Telekom-0.101.tar.gz ~wwwdata/htdocs/CPAN/authors/id/ULPFR mkpackages ~wwwdata/htdocs/CPAN
Ulrich Pfeifer <pfeifer@wait.de>