Robert Rothenberg > CPAN-Mini-Tested-0.22 > CPAN::Mini::Tested

Download:
CPAN-Mini-Tested-0.22.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.22   Source  

NAME ^

CPAN::Mini::Tested - create a CPAN mirror using modules that have passed tests

SYNOPSYS ^

  use CPAN::Mini::Tested;

  CPAN::Mini::Tested->update_mirror(
   remote => "http://cpan.mirrors.comintern.su",
   local  => "/usr/share/mirrors/cpan",
   trace  => 1
  );

DESCRIPTION ^

This module is a subclass of CPAN::Mini which checks the CPAN Testers database for passing tests of that distribution on your platform. Distributions will only be downloaded if there are passing tests.

The major differences are that it will download the testers.db file from the CPAN Testers web site when updating indices, and it will check if a distribution has passed tests in the specified platform before applying other filtering rules to it.

The following additional options are supported:

test_db_exceptions

A Regexp or array of Regexps (or Regexp strings) of module paths that will be included in the mirror even if there are no passed tests for them.

If it is a code reference, then it refers to a subroutine which takes the module path as an argument and returns true if it is an exception.

Note that if these modules are already in the exclusion list used by CPAN::Mini, then they will not be included.

test_db_age

The maximum age of the local copy of the testers database, in days. The default is 1.

When set to 0, or when the force option is set, the latest copy of the database will be downloaded no matter how old it is.

When set to -1, a new copy will never be downloaded.

Note that the testers database can be quite large (over 15MB).

test_db_src

When to download the latest copy of the testers database. Defaults to http://testers.cpan.org/testers.db.

test_db_file

The location of the local copy of the testers database. Defaults to the root directory of local.

test_db_os

The platform that tests are expected to pass. Defaults to the current platform $Config{osname}.

If this is set to a list of platforms (an array reference), then it expects tests on any one of those platforms to pass. This is useful for maintaining a mirror that supports multiple platforms, or in cases where there tests are similar platforms are acceptable.

test_db_conn

Connection parameters for DBI. In most cases these can be ignored.

test_db_cache_expiry

The number of seconds it caches database queries. Defaults to 300.

CPAN::Mini will check the filters multiple times for distributions that contain multiple modules. (Older versions of CPAN::Mini will check the filters multiple times per module.) Caching the results improves performance, but we need to maintain the results for very long, nor do we want all of the results to use memory.

Subclassed Methods

The following methods are subclasses from CPAN::Mini:

_filter_module

In addition to noting if a module is in the exclusion list, it also notes if it has not passed any tests.

mirror_indices

Downloads the latest testers.db database file (if needed) and connects to the database before it begins downloading indices.

file_allowed

Also notes if the file is the testers.db databse file.

clean_unmirrored

Disconnects from the database before cleaning files.

CAVEATS ^

This module is only of use if there are active testers for your platform.

Note that the lack of passing tests in the testers database does not mean that a module will not run on your platform, only that it will not be downloded. (There may be a lag of several days before test results of the newest modules appear in the database.) Likewise, passing tests do not mean that a module will run on your platform.

If the way filters are handled in CPAN::Mini is changed in the future, then some of these issues can be resolved by downloading the most recent version which has passed tests.

DSLIP ^

  b - Beta testing
  d - Developer
  p - Perl-only
  O - Object oriented
  p - Standard Perl

See http://cpan.uwinnipeg.ca/htdocs/faqs/dslip.html

AUTHOR ^

Robert Rothenberg <rrwo at cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 by Robert Rothenberg. All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO ^

CPAN::Mini

CPAN::WWW::Testers

CPAN Testers http://testers.cpan.org

syntax highlighting: