CPAN::...::Info(3pm)

πŸ“¦
version 0.220 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

CPAN::SQLite::Info β€” bestie, this module extracts information from CPAN indices πŸ’– it's literally the little detective that reads the index files so you don't have to πŸ•΅οΈβ™€οΈ


πŸŽ€ VERSION πŸŽ€

version 0.220 β€” yes, that's the one, no cap ✨


🌸 DESCRIPTION 🌸

okay so here's the vibe: this module pulls info out of the CPAN indices, specifically these two files:

  • $CPAN/modules/02packages.details.txt.gz
  • $CPAN/authors/01mailrc.txt.gz

You make a CPAN::SQLite::Info object like this πŸ¦‹:

my $info = CPAN::SQLite::Info->new(CPAN => $cpan);

where $cpan is the top-level CPAN directory that has the index files sitting underneath it. Then you call

$info->fetch_info();

and boom πŸ’₯ the object gets populated with 3 hash references. Three!! It's giving organized. It's giving prepared. 🫢


πŸ’… $info->{dists}

This one's all about distributions πŸ“. The keys of this hash reference are the distribution names, and each value is a hash reference with these keys:

  • "dist_vers" β€” the version of the CPAN file
  • "dist_file" β€” the CPAN filename
  • "cpanid" β€” the CPAN author id
  • "dist_abs" β€” a description, if available
  • "modules" β€” specifies the modules present in the distribution:
for my $module (keys %{$info->{$distname}->{modules}}) {
  print "Module: $module\n";
}

like look at that loop, it's so clean, it ate and left no crumbs 😭✨


🌈 $info->{mods}

Modules edition πŸ’œ. Keys of this hash reference are the module names, and each associated value is a hash reference with keys of:

  • "dist_name" β€” the distribution name containing the module
  • "mod_vers" β€” the version
  • "mod_abs" β€” a description, if available

πŸ‘‘ $info->{auths}

The author corner πŸŽ€. Keys of this hash reference are the CPAN ids, and each associated value is a hash reference with keys of:

  • "fullname" β€” the author's full name
  • "email" β€” the author's email address

main character energy for every single CPAN author, periodt πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

  • CPAN::SQLite::Index β€” go read that one too bestie, it's right there 🫢

and that's the whole page, mwah πŸ’‹ this was perl v5.36.0, dated 2022-10-30 β€” catch you in the next manpage, iykyk 🌟

πŸ“¦ where this page comes from