CPANDB(1p)

πŸ“¦
version 0.220 Β· 2 versions
  • 0.220 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.219 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 a MIRRORED.BY file 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 that CPAN.pm uses, 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 that DBD::SQLite will use. if you don't give it, it defaults to cpandb-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 the cpan_home directory of CPAN.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 the setup option. no skipping steps. 🫢
  • --reindex 'dist_name' β€” this specifies that the CPAN distribution dist_name is 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