NAME
CPAN::Mini -- create a minimal mirror of CPAN
VERSION
version 0.10
$Id: Mini.pm,v 1.3 2004/08/26 14:52:08 rjbs Exp $
SYNOPSIS
(If you're not going to do something weird, you probably want to look at the minicpan command, instead.)
use CPAN::Mini;
CPAN::Mini->mirror(
remote => "http://cpan.mirrors.comintern.su",
local => "/usr/share/mirrors/cpan",
trace => 1
);
DESCRIPTION
CPAN::Mini provides a simple mechanism to build and update a minimal mirror of the CPAN on your local disk. It contains only those files needed to install the newest version of every distribution. Those files are:
01mailrc.txt.gz
02packages.details.txt.gz
03modlist.data.gz
the last non-developer release of every dist for every author
METHODS
update_mirror( %args )
CPAN::Mini->mirror(
remote => "http://cpan.mirrors.comintern.su",
local => "/usr/share/mirrors/cpan",
force => 0,
trace => 1
);
This is the only method that need be called from outside this module. It will update the local mirror with the files from the remote mirror. If the trace
option is true, CPAN::Mini will print status messages as it runs.
update_mirror
creates an ephemeral CPAN::Mini object on which other methods are called. That object is used to store mirror location and state.
This method returns the number of files updated.
mirror_file($path, $skip_if_present)
This method will mirror the given file from the remote to the local mirror, overwriting any existing file unless $skip_if_present
is true.
clean_unmirrored
This method finds any files in the local mirror which are no longer needed and removes them.
SEE ALSO
Randal Schwartz's original article on minicpan, here:
http://www.stonehenge.com/merlyn/LinuxMag/col42.html
CPANPLUS::Backend, which provides the local_mirror
method, which performs the same task as this module.
AUTHORS
Randal Schwartz <merlyn@stonehenge.com> did all the work.
Ricardo SIGNES <rjbs@cpan.org> made a module and distribution.
This code was copyrighted in 2004, by Randal Schwartz.