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,
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
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.
Returns the list of entries as an array reference.
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.
This source is in Github:
brian d foy,
Copyright (c) 2009, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.