App::CPANIDX::HTTP::Server - HTTP::Server::Simple based server for CPANIDX
use strict; use warnings; use App::CPANIDX::HTTP::Server; my $dsn = 'dbi:SQLite:dbname=cpanidx.db'; my $user = ''; my $pass = ''; my $port = 8082; # the port to listen for requests on my $server = App::CPANIDX::HTTP::Server->new( $port ); $server->dsn( $dsn, $user, $pass ); $server->run(); # Requests can now be directed to http://nameofyourserver:8082/cpanidx/
App::CPANIDX::HTTP::Server is a HTTP::Server::Simple based server for CPANIDX. Use the
cpanidx-gendb script provided by App::CPANIDX to generate a CPANIDX database and then use this module to serve the associated data.
Start a new instance of App::CPANIDX::HTTP::Server. Takes one option, the port number to start listening on for requests. If it is not provided will default to
new, but before calling
run, call this to assign the database details to the server. Takes three arguments: a DBI
DSN string, a username (if applicable) and a password (if applicable).
Runs the server and starts handling requests.
Deals with requests. No user serviceable parts.
Chris Williams <firstname.lastname@example.org>
This software is copyright (c) 2011 by Chris Williams.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.