Parse::...butions(3)

πŸ“¦
version 0.14 Β· 2 versions
, in fedora 43

πŸ’– Parse::CPAN::Distributions πŸ’–

okay bestie, so this page is Parse::...butions(3) from the User Contributed Perl Documentation section β€” and no, the title isn't being dramatic, it's just that Parse::CPAN::Distributions is so long the man page had to shorten it. iconic behavior honestly.


✨ NAME ✨

Parse::CPAN::Distributions β€” it gives you an index for the current CPAN distributions. that's it, that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

here's the group chat of what you can do:

my $oncpan   = Parse::CPAN::Distributions->new(database => $db);
my $found    = $oncpan->listed($distribution,$version);
my $any      = $oncpan->listed($distribution);
my @dists    = $oncpan->distributions_by($author);
my $author   = $oncpan->author_of($distribution,$version);
my $version  = $oncpan->latest_version($distribution);
my @versions = $oncpan->versions($distribution);

look at her go. she's serving. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so basically? this distribution lets you index the distributions that are currently listed on CPAN. and how does it do that, you ask? by parsing the index file find-ls. yes, the whole thing is a glow-up for one flat file. main character energy fr fr. πŸ‘‘


πŸŽ€ INTERFACE πŸŽ€

The Constructor

new

it parses find-ls, extracting the list of all the module distributions. no cap.

  • takes one optional hash key/pair, 'file', which you can use to specify the path to an existing compressed or uncompressed find-ls file.
  • by default a copy will be downloaded and automatically loaded into memory. it just does that. effortless. ✨
if new returns undef, then $Parse::CPAN::Distributions::ERROR will contain the error message that got recorded. so like, if it's not giving, check the ERROR var, bestie. 😭

Methods

  • listed β€” give it a distribution and a version, and it returns 1 if it's on CPAN, otherwise 0. and note: if you don't hand it a version, it just assumes you're looking for any version. flexible queen. 🫢
  • distributions_by β€” give it an author ID, get back a sorted list of the versioned distributions currently available on CPAN. sorted, because we're organized. 🌈
  • author_of β€” give it a distribution and a version, and it returns the author ID if it's available on CPAN. otherwise you get undef back. it's giving mystery. πŸ™ˆ
  • latest_version β€” give it a distribution, get the latest known version on CPAN. give it a distribution and an author, and it returns the latest version for that author.
note that a return value of 0 implies unknown. so don't come for her, 0 is not a version, it's a shrug. πŸ’€
  • versions β€” give it a distribution and it returns all the versions available on CPAN. give it a distribution and an author and it returns all the versions attributed to that author. yes the typo in the original says "dsitribution", we love her anyway. πŸ“
  • parse β€” parses find-ls, extracting the list of all the module distributions. the whole engine, the moment, the ✨.

πŸ› BUGS, PATCHES & FIXES πŸ›

there are no known bugs at the time of this release. slay.

however!! if you spot a bug, or you're experiencing difficulties that aren't explained within the POD documentation, please send bug reports and patches to the RT Queue (see below, bestie).

fixes are dependent upon their severity and my availability. so if a fix is not forthcoming, please feel free to (politely) remind me. politely β€” that part is load-bearing. πŸ’–

RT:

http://rt.cpan.org/Public/Dist/Display.html?Name=Parse-CPAN-Distributions

πŸ”₯ SEE ALSO πŸ”₯

  • Parse-CPAN-Authors
  • Parse-CPAN-Packages

go read those too, they're the friend group. πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Barbie, <barbie@cpan.org>
for Miss Barbell Productions <http://www.missbarbell.co.uk>.

Copyright (C) 2008-2014 Barbie for Miss Barbell Productions.

this distribution is free software; you can redistribute it and/or modify it under the Artistic License v2.


and that's the whole page, bestie!! no cap, you're now certified in Parse::CPAN::Distributions. this was perl v5.42.0, dated 2025-07-25, and it ate. periodt. πŸŽ€πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from