NAME
App::CPAN::MetaDB - Provide CPAN metadata for cpanminus clients
VERSION
Version 0.02
SYNOPSIS
This is a Plack application that grabs CPAN metadata and serves it to cpanminus clients. You can serve cpanminus clients by creating a app.psgi
application:
#!/usr/bin/env plackup
use strict;
use warnings;
use Plack::Builder;
use App::CPAN::MetaDB;
use App::CPAN::MetaDB::Memcached;
my $metadb = App::CPAN::MetaDB->new(
mirror => 'http://cpan.cpantesters.org', # use the most suitable (fast) mirror
storage => App::CPAN::MetaDB::Memcached->new({
servers => ['127.0.0.1:11211']
})
);
builder {
mount "/" => $metadb->app;
}
METHODS
new(%opts)
Creates a new object. The following arguments will be required:
mirror
The CPAN mirror to fetch the metadata from. This should not be a CPAN::Mini mirror unless you explicitly fetching /modules/02packages.details.txt.gz in your
.minicpanrc
.storage
The storage engine you wish to use, along with any required arguments.
app
Returns a code reference - this is the Plack $app
that is passed along.
fetch_packages
Fetches, parses and stores the package list from the defined CPAN Mirror. This is a memory consuming task - careful with its use in memory constrained environments.
AUTHOR
Squeeks, <squeek at cpan.org>
BUGS
Please report any bugs or feature requests to bug-app-cpan-metadb at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-CPAN-MetaDB. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc App::CPAN::MetaDB
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Tatsuhiko Miyagawa for App::cpanminus.
LICENSE AND COPYRIGHT
Copyright 2011 Squeeks.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.