NAME Parse::CPAN::Packages - Parse 02packages.details.txt.gz SYNOPSIS use Parse::CPAN::Packages; # must have downloaded and un-gzip-ed my $p = Parse::CPAN::Packages->new("02packages.details.txt"); # either a filename as above or pass in the contents of the file my $p = Parse::CPAN::Packages->new($packages_details_contents); my $m = $p->package("Acme::Colour"); # $m is a Parse::CPAN::Packages::Package object print $m->package, "\n"; # Acme::Colour print $m->version, "\n"; # 1.00 my $d = $p->distribution; # $d is a Parse::CPAN::Packages::Distribution object print $d->prefix, "\n"; # L/LB/LBROCARD/Acme-Colour-1.00.tar.gz print $d->dist, "\n"; # Acme-Colour print $d->version, "\n"; # 1.00 print $d->maturity, "\n"; # released print $d->filename, "\n"; # Acme-Colour-1.00.tar.gz print $d->cpanid, "\n"; # LBROCARD print $d->distvname, "\n"; # Acme-Colour-1.00 # all the package objects my @packages = $p->packages; # all the distribution objects my @distributions = $p->distributions; # the latest distribution $d = $p->latest_distribution("Acme-Colour"); is($d->prefix, "L/LB/LBROCARD/Acme-Colour-1.00.tar.gz"); is($d->version, "1.00"); # all the latest distributions my @distributions = $p->latest_distributions; DESCRIPTION The Comprehensive Perl Archive Network (CPAN) is a very useful collection of Perl code. It has several indices of the files that it hosts, including a file named "02packages.details.txt.gz" in the "modules" directory. This file contains lots of useful information and this module provides a simple interface to the data contained within. Note that this module does not concern itself with downloading or unpacking this file. You should do this yourself. The constructor takes the path to the 02packages.details.txt file. It defaults to loading the file from the current directory. In a future release Parse::CPAN::Packages::Package and Parse::CPAN::Packages::Distribution might have more information. AUTHOR Leon Brocard COPYRIGHT Copyright (C) 2004, Leon Brocard This module is free software; you can redistribute it or modify it under the same terms as Perl itself.