Apache2::CPAN::Search - mod_perl interface to CPAN::Search::Lite::Query |
Apache2::CPAN::Search - 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::Search
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
The response handler can then be specified as
<Location "/search"> SetHandler perl-script PerlResponseHandler Apache2::CPAN::Search->search </Location>
A request for http://localhost/search
without any
query string will bring up a page of chapterid listings.
All other requests are handled through the query string
arguments.
mode=$value
$value
of mode
mode=dist
, mode=author
, mode=module
mode=chapter
mode=mirror
mode=$mode;query=$query
$mode
must 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.
mode=$mode;letter=$letter
$mode
must be one of dist
,
module
, or author
. If $letter
is a single letter,
this returns, resepctively, all
distribution names, module names, or CPAN ids beginning
with the specified letter. If $letter
is more than one
letter, all distribution names matching $letter-*
are returned,
for mode=dist
, or all module names matching $letter::*
are returned, for mode=module
.
recent=$age
$age
days.
chapterid=$id
$id
.
chapterid=$id;subchapter=$subchapter
$subchapter
in the $id
chapter.
module=$name
or mod_id=$id
dist=$name
or dist_id=$id
cpanid=$cpanid
or author=$cpanid
or auth_id=$id
Make sure to check the values of $db
, $user
,
$passwd
, and $tt2
at the top of this file.
the Apache2::CPAN::Query manpage, the CPAN::Search::Lite::Query manpage, and mod_perl.
Apache2::CPAN::Search - mod_perl interface to CPAN::Search::Lite::Query |