Creates a new instance from a details file.
The constructor can be passed either the path to the 02packages.details.txt.gz file, a path to an ungzipped version of this file, or a scalar containing the entire uncompressed contents of the file.
Note that this module does not concern itself with downloading this file. You should do this yourself. For example:
If you have a configured CPAN, then theres usually already a cached file available:
Returns a Parse::CPAN::Packages::Package that represents the
|packages()||Returns a list of <B>Parse::CPAN::Packages::PackageB> objects representing all the packages that were extracted from the file.|
|package_count()||Returns the number of packages stored.|
Returns a <B>Parse::CPAN::Packages::DistributionB> object that
represents the filename passed:
|distributions()||Returns a list of <B>Parse::CPAN::Packages::DistributionB> objects representing all the known distributions.|
|distribution_count()||Returns the number of distributions stored.|
Returns the Parse::CPAN::Packages::Distribution object that
represents the latest distribution for the named disribution passed,
that is to say it returns the distribution that has the highest
version number (as determined by version.pm or number comparison if
|latest_distrbutions()||Returns a list of <B>Parse::CPAN::Packages::DistributionB> objects representing all the latest distributions.|
|latest_distribution_count()||Returns the number of distributions stored.|
These methods return the information from the preamble at the start of the file. They return undef if for any reason no matching preamble line was found.
file() url() description() columns() intended_for() written_by() line_count() last_updated()
These are additional methods that you may find useful.
parse($filename) Parses the filename. Works in a similar fashion to the the constructor (i.e. you can pass it a filename for a compressed/1uncompressed file, a uncompressed scalar containing the file. You can also pass nothing to indicate to load the compressed file from the current working directory.)
Note that each time this function is run the packages and distribtions found will be added to the current list of packages.
add_quick($package_name, $package_version, $prefix) Quick way of adding a new package and distribution. add_package($package_obj) Adds a package. Note that youll probably want to add the corrisponding distribution for that package too (its not done automatically.) add_distribution($distribution_obj) Adds a distribution. Note that youll probably want to add the corresponding packages for that distribution too (its not done automatically.) distribution_from_prefix($prefix) Returns a distribution given a prefix. latest_distributions Returns all the latest distributions:
my @distributions = $p->latest_distributions;
Leon Brocard <firstname.lastname@example.org>
Copyright (C) 2004-9, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
This module leaks memory as packages hold distributions and distributions hold packages. No attempt has been made to fix this as its not anticpated that this will be used in long running programs that will dispose of the objects once created.
delete_* methods. merge_into method. Documentation for other modules.
|perl v5.20.3||PARSE::CPAN::PACKAGES (3)||2015-02-06|