CPANDB(1p)
π CPANDB β bestie's guide to the cpandb command π
okay so. this page is the manual for cpandb, and cpandb is basically the interface to CPAN::SQLite. it's your lil' bestie script that lets you talk to CPAN::SQLite's routines so you can set up, keep up, and search a DBD::SQLite database of CPAN. that's the whole vibe. π«Ά
β¨ VERSION β¨
version 0.220 π
πΈ DESCRIPTION πΈ
so this script? it's an interface to the routines of CPAN::SQLite for setting up, maintaining and searching a DBD::SQLite database of CPAN. and the available options group into three categories, which is giving very organized, very main character. π
π Common options π
these are the options that are common to both setting up and maintaining the database and performing queries on it. so like, they show up either way. iconic. β¨
--CPAN '/path/to/CPAN'β this one specifies the path to where the index files are to be stored. it could be a local CPAN mirror β which is defined here by the presence of aMIRRORED.BYfile beneath this directory β or it could be a local directory in which to store these files from a remote CPAN mirror. in that second case, the index files get fetched from a remote CPAN mirror, using the same list thatCPAN.pmuses, if this is configured, and they're updated if they are more than one day old. β³
if the CPAN option is not given, it defaults to cpan_home of CPAN::, if this is configured, with the sources being found under keep_source_where. and if such a directory isn't found? fatal error. π updates to these index files are assumed here to be handled by CPAN.pm.
--db_name 'cpan-sqlite'β this is the name of the database thatDBD::SQLitewill use. if you don't give it, it defaults tocpandb-sqlite.--db_dir '/path/to/db/dir'β this specifies the path to where the database file is found. if you don't give it, it defaults to thecpan_homedirectory ofCPAN.pm, if present, or to the directory in which the script was invoked. π
π₯ Indexing options π₯
these are the options used for setting up and maintaining the database. they include:
--setupβ this specifies that the database is to be created and populated from the CPAN indices. heads up bestie: any existing database will be overwritten. π
fr fr, --setup does not play. your old database is gone gone. be so careful.
--updateβ this is used to update an existing database, which must have first been created with thesetupoption. no skipping steps. π«Ά--reindex 'dist_name'β this specifies that the CPAN distributiondist_nameis to be reindexed. π¦
π Querying options π
these options are used to query the database. the available ones are:
--module Mod::Nameβ this provides information on the specified module name.--dist Dist-Nameβ this provides information on the specified distribution name.--cpanid CPANIDβ this provides information on the specified CPAN author id. π
all search terms are assumed to be exact matches in a case-insensitive manner. so like, not fuzzy, but also not picky about case. slay. β¨
there's no limit on the maximum number of records. but if you need to adjust the number because you get too many results, set the CPAN_SQLITE_MAX_RESULTS environment variable. π
π SEE ALSO π
CPAN::SQLite. that's it, that's the reference. π
okay and that's the whole page bestie!! this one came from perl v5.36.0, dated 2022-10-30, and it lives in section 1p under the name CPANDB β go forth and query, you've absolutely got this π
β¨π¦
π¦ where this page comes from
- debian bookworm: libcpan-sqlite-perl 0.220-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcpan-sqlite-perl 0.220-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcpan-sqlite-perl 0.220-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcpan-sqlite-perl 0.220-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcpan-sqlite-perl 0.220-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms