CPAN::PackageDetails::Entries - Handle the collection of records of 02packages.details.txt.gz
Used internally by CPAN::PackageDetails
Creates a new Entries object. This doesn't do anything fancy. To add to it, use add_entry.
entry_class => the class to use for each entry object
columns => the column names, in order that you want them in the output
If you specify the allow_packages_only_once option with a true value and you try to add that package twice, the object will die. See add_entry.
Returns the class that Entries uses to make a new Entry object.
Returns a list of the column names in the entry
Returns the list position of the named COLUMN.
Returns the number of entries. This is not the same as the number of lines that would show up in the 02packages.details.txt file since this method counts duplicates as well.
DEPRECATED: use get_hash
Returns the list of entries as an hash reference. The hash key is the package name.
Set or retrieve the value of the allow_packages_only_once setting. It's a boolean.
Allow an entry to accept an illegal name. Normally you shouldn't use this, but PAUSE has made bad files before.
Set or retrieve the value of the disallow_alpha_versions settings. It's a boolean.
Add an entry to the collection. Call this on the CPAN::PackageDetails object and it will take care of finding the right handler.
If you've set allow_packages_only_once to a true value (which is the default, too), add_entry will die if you try to add another entry with the same package name even if it has a different or greater version. You can set this to a false value and add as many entries as you like then use as_unqiue_sorted_list to get just the entries with the highest versions for each package.
Returns true if there is already an entry for PACKAGE.
Returns a text version of the Entries object. This calls as_string on each Entry object, and concatenates the results for all Entry objects.
In list context, this returns a list of entries sorted by package name and version. Each package exists exactly once in the list and with the largest version number seen.
In scalar context this returns the count of the number of unique entries.
Once called, it caches its result until you add more entries.
Returns the entry objects for the named DISTRIBUTION.
Returns the entry objects for the named PACKAGE.
Returns the entry objects for any entries with PATH.
Returns the entry objects for any entries with VERSION.
This source is in Github:
brian d foy, <firstname.lastname@example.org>
Copyright © 2009-2024, brian d foy <email@example.com>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.
To install CPAN::PackageDetails, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.