05 Feb 2021 07:26:16 UTC
- Distribution: CPAN-PackageDetails
- Module version: 0.263
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (77 / 0 / 0)
- KwaliteeBus factor: 1
- 78.17% Coverage
- License: artistic_2
- Perl: v5.8.0
- Activity24 month
- Download (49.76KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionBDFOY brian d foy
CPAN::PackageDetails::Redis - Handle the collection of records of 02packages.details.txt.gz
Used internally by CPAN::PackageDetails to store the details in a redis database.
Creates a new Entries object. This doesn't do anything fancy. To add to it, use
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_onceoption 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
- column_index_for( COLUMN )
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 hash reference. The hash key is the package name.
- allow_packages_only_once( [ARG] )
Set or retrieve the value of the allow_packages_only_once setting. It's a boolean.
- allow_suspicious_names( [ARG] )
Allow an entry to accept an illegal name. Normally you shouldn't use this, but PAUSE has made bad files before.
- disallow_alpha_versions( [ARG] )
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::PackageDetailsobject and it will take care of finding the right handler.
If you've set
allow_packages_only_onceto a true value (which is the default, too),
add_entrywill 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_listto get just the entries with the highest versions for each package.
- already_added( PACKAGE )
Returns true if there is already an entry for PACKAGE.
Returns a text version of the Entries object. This calls
as_stringon 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.
- get_entries_by_package( PACKAGE )
Returns the entry objects for the named PACKAGE.
- get_entries_by_distribution( DISTRIBUTION )
Returns the entry objects for the named DISTRIBUTION.
- get_entries_by_version( VERSION )
Returns the entry objects for any entries with VERSION.
- get_entries_by_path( PATH )
Returns the entry objects for any entries with PATH.
This source is in Github:
brian d foy,
Copyright © 2009-2021, brian d foy <firstname.lastname@example.org>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.
Module Install Instructions
To install CPAN::PackageDetails, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install CPAN::PackageDetails
For more information on module installation, please visit the detailed CPAN module installation guide.