App-CPANIDX
view release on metacpan or search on metacpan
lib/App/CPANIDX.pm view on Meta::CPAN
package App::CPANIDX;
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = '0.40';
1;
__END__
=head1 NAME
App::CPANIDX - Queryable web-based CPAN Index
=head1 SYNOPSIS
# Generate the index database
$ cpanidx-gendb --config cpanidx.ini
# Run the FastCGI script
$ cpanidx-fcgi --config cpanidx.ini
=head1 DESCRIPTION
App::CPANIDX provides a number of scripts to build a queryable web-based CPAN index.
=head1 CONFIGURATION
Configuration is dealt with by a L<Config::Tiny> based configuration file.
There are a number of parameters which can be specified
=over
=item C<dsn>
The L<DBI> dsn string of the database that the scripts will use. This is a mandatory requirement.
=item C<user>
The username for the supplied C<dsn>.
=item C<pass>
The password for the supplied C<dsn>.
=item C<url>
The C<cpanidx-gendb> script will poll this url when it has finished its update. It should be the
root url of your CPANIDX site
url=http://my.cpanidx.site/cpanidx/
=item C<mirror>
The url of a CPAN mirror site where C<cpanidx-gendb> will obtain its index files from. If not
supplied it defaults to the Funet site L<ftp://ftp.funet.fi/pub/CPAN/>.
=item C<socket>
This is the socket that L<FCGI> should listen on for requests. It is a mandatory requirement for the
C<cpanidx-fcgi> script.
=item C<skipcore>
Applicable to the C<cpanidx-gendb> script, will skip the generation of the L<Module::CoreList>
based tables.
=item C<skipmirrors>
Applicable to the C<cpanidx-gendb> script, will skip the generation of the mirrorlist
based tables.
=item C<skipperms>
Applicable to the C<cpanidx-gendb> script, will skip the generation of the CPAN permissions
based tables.
=back
=head1 SCRIPTS
Both the scripts will by default look for a C<cpanidx.ini> file in the current working directory
unless you specify an alternative with the C<--config> command line option.
=over
=item C<cpanidx-gendb>
Generates the CPANIDX database. It will retrieve the CPAN index files from a CPAN mirror and
parse them to build the database.
The CPAN indexes are downloaded to C<~/.cpanidx> by default. You may override this location
by setting the C<PERL5_CPANIDX_DIR> environment variable to a different location to use.
In tests a L<DBD::SQLite> database took over 3 minutes to generate and a L<DBD::mysql> database
took 30 seconds.
It is recommended that one uses cron or some such scheduler to run this script every hour to
ensure freshness of the CPAN index.
=item C<cpanidx-fcgi>
Presents the CPAN index to web clients via FastCGI. Specify a socket that the script should
listen for requests on and configure your webserver accordingly.
( run in 1.129 second using v1.01-cache-2.11-cpan-5a3173703d6 )