NAME

Parse::CPAN::Distributions - Provides an index for current CPAN distributions

SYNOPSIS

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);

DESCRIPTION

This distribution provides the ability to index the distributions that are currently listed on CPAN. This is done by parsing the index file find-ls.

INTERFACE

The Constructor

new

Parses find-ls, extracting the list of all the module distributions.

Takes one optional hash key/pair, 'file', which can be used to specify the path an existing compressed or uncompressed 'find-ls' file. By default a copy will be downloaded and automatically loaded into memory.

Methods

listed

Given a distribution and version, returns 1 if on CPAN, otherwise 0. Note that if version is not provides it will assume you are looking for any version.

distributions_by

Given an author ID, returns a sorted list of the versioned distributions currently available on CPAN.

author_of

Given a distribution and version, returns the author ID if available on CPAN, otherwise undef is returned.

latest_version

Given a distribution, returns the latest known version on CPAN. If given a distribution and author, will return the latest version for that author.

Note that a return value of 0, implies unknown.

versions

Given a distribution will return all the versions available on CPAN. Given a dsitribution and author, will return all the versions attributed to that author.

parse

Parse find-ls, extracting the list of all the module distributions.

BUGS, PATCHES & FIXES

There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties, that is not explained within the POD documentation, please send bug reports and patches to the RT Queue (see below).

Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me.

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

SEE ALSO

Parse-CPAN-Authors, Parse-CPAN-Packages

AUTHOR

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

COPYRIGHT AND LICENSE

Copyright (C) 2008 Barbie for Miss Barbell Productions.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.