Apache2::CPAN::Query - mod_perl interface to CPAN::Search::Lite::Query |
Apache2::CPAN::Query - mod_perl interface to CPAN::Search::Lite::Query
This module provides a mod_perl (2) interface to CPAN::Search::Lite::Query.
The modules Apache2::Request
and Apache2::Cookie
of the libapreq2
distribution
are required. A directive
PerlLoadModule Apache2::CPAN::Query
should appear before any of the Location
directives
using the module. As well, the following directives should
be defined in the Apache configuration file.
CSL_db database
CSL_user user
CSL_passwd password
CSL_user
.]
CSL_tt2 /path/to/tt2
CSL_dl http://www.cpan.org
CSL_max_results 200
CSL_html_root /usr/local/httpd/CPAN
CSL_html_uri http://you.org/CPAN/docs
Available response handlers are as follows.
<Location "/search"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->search </Location>
This handles search queries such as for
http://localhost/search?mode=dist;query=libnet.
mode
can be one of dist
, module
, or author
.
A search using the specified query
will be done on, respectively, distribution names and abstracts,
module names and abstracts, and CPAN ids and full names.
<LocationMatch "/~[A-Za-z0-9-]+"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->cpanid </LocationMatch>
There are two levels:
CPANID
.
Dist-Name
of cpanid CPANID
.
<Location "/author"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->author </Location>
There are 3 levels:
CPANID
.
A
.
<Location "/dist"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->dist </Location>
There are 4 levels:
Dist-Name
.
A
.
ABC-*
.
<Location "/module"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->module </Location>
There are 4 levels:
Mod::Name
.
A
.
ABC::*
.
<Location "/chapter"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->chapter </Location>
There are 3 levels:
%chaps
of CPAN::Search::Lite::Util
).
Data Type Utilities
chapter.
Tie
subchapter of the Data Type Utilities
chapter.
<Location "/recent"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->recent </Location>
With this, a request for http://localhost/recent will list all distributions uploaded in the last 7 days.
<Location "/mirror"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->mirror </Location>
With this, a request for http://localhost/mirror will bring up a page whereby the user can change the location of where downloads will be redirected to. This requires cookies to be enabled.
<Location "/perldoc"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Query->perldoc </Location>
With this, a request for, eg, http://localhost/perldoc/perlfaq will be redirected to the perfaq documentation, and a request for, eg, http://localhost/perldoc/Net::FTP, will be redirected to the documentation for Net::FTP.
the Apache2::CPAN::Search manpage, the CPAN::Search::Lite::Query manpage, and mod_perl.
Apache2::CPAN::Query - mod_perl interface to CPAN::Search::Lite::Query |