| 1 |
This is the README for CPAN::SQLite, which is used for setting up, |
| 2 |
maintaining, and searching through a local CPAN database consisting |
| 3 |
of information in the three main CPAN index files: |
| 4 |
$CPAN/modules/03modlist.data.gz |
| 5 |
$CPAN/modules/02packages.details.txt.gz |
| 6 |
$CPAN/authors/01mailrc.txt.gz |
| 7 |
DBD::SQLite is used as the database engine. |
| 8 |
|
| 9 |
Installation proceeds through the usual |
| 10 |
perl Makefile.PL |
| 11 |
$MAKE |
| 12 |
$MAKE test |
| 13 |
$MAKE install |
| 14 |
or, if Module::Build is available, |
| 15 |
perl Build.PL |
| 16 |
perl Build |
| 17 |
perl Build test |
| 18 |
perl Build install |
| 19 |
|
| 20 |
The package consists of a number of modules: |
| 21 |
CPAN::SQLite: the top-level package |
| 22 |
CPAN::SQLite::Index: set up and maintain the database |
| 23 |
CPAN::SQLite::Info: extract information from the CPAN indices |
| 24 |
CPAN::SQLite::META: helper module for CPAN.pm integration |
| 25 |
CPAN::SQLite::State: gather information on the state of the database |
| 26 |
CPAN::SQLite::Search: methods to search the database |
| 27 |
CPAN::SQLite::Populate: populate the database tables |
| 28 |
CPAN::SQLite::DBI: DBI information for the database |
| 29 |
CPAN::SQLite::DBI::Index: DBI information for indexing the database |
| 30 |
CPAN::SQLite::DBI:Search: DBI information for searching the database |
| 31 |
See the pod documentation of the specific modules for details. |
| 32 |
|
| 33 |
Perhaps the easiest way to set up and maintain the database is through |
| 34 |
the supplied cpandb script. If we assume that there is a CPAN.pm |
| 35 |
client available and configured, the database can be created via |
| 36 |
cpandb --setup |
| 37 |
which will create the database file cpandb.sql under the |
| 38 |
"cpan_home" defined in CPAN::Config (this is the same location |
| 39 |
as where CPAN.pm's Metadata is found). Subsequent updates to |
| 40 |
the database can be done through |
| 41 |
cpandb --update |
| 42 |
This scenario assumes that updates to the CPAN index files are |
| 43 |
handled by CPAN.pm. |
| 44 |
|
| 45 |
The cpandb script also provides some elementary searches: |
| 46 |
cpandb --module My::Module |
| 47 |
cpandb --dist My-Dist |
| 48 |
cpandb --cpanid ME |
| 49 |
which will provide some information on, respectively, the |
| 50 |
specified CPAN module, distribution, and CPAN author id. |
| 51 |
The query terms are assumed to match exactly, and are |
| 52 |
case-insensitive. |
| 53 |
|
| 54 |
As of CPAN.pm version 1.88_65, there is experimental support |
| 55 |
within CPAN.pm for using CPAN::SQLite to obtain |
| 56 |
information on packages, modules, and authors. One goal |
| 57 |
of this is to reduce the memory footprint of the CPAN.pm |
| 58 |
shell, as this information is no longer all preloaded into |
| 59 |
memory. This can be enabled through |
| 60 |
perl -MCPAN -e shell |
| 61 |
cpan> o conf use_sqlite 1 |
| 62 |
|
| 63 |
This version is considered alpha. Please report bugs |
| 64 |
and feature requests to CPAN's request tracker: |
| 65 |
|
| 66 |
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-SQLite |
| 67 |
|
| 68 |
or directly to the author. Development takes place at |
| 69 |
|
| 70 |
http://cpan-search.svn.sourceforge.net/viewvc/cpan-search/CPAN-SQLite/ |
| 71 |
|
| 72 |
This software is copyright 2006,2008 by Randy Kobes |
| 73 |
<[email protected]>. Use and |
| 74 |
redistribution are under the same terms as Perl itself. |