CPAN::Index::API - Read and write CPAN index files
my $index = CPAN::Index::API->new_from_repo_uri( repo_uri => 'http://cpan.perl.org/', files => [qw(PackagesDetails ModList MailRc)], ); my $packages = $index->file('PackagesDetails');
CPAN::Index::API is a library to read and write CPAN index files. See the modules in the CPAN::Index::API::File namespace for documentation on the individual files supported.
CPAN::Index::API
CPAN::Index::API::File
This class provides a convenient interface for working with multiple files from the same location at the same time.
Creates a new index object. Accepts the following parameters:
Required. Hashrefs whose values are CPAN::Index::API::File objects. The individual objects can later be accessed by their respective hash key via the "file" method.
Optional. Path to the root of the repository to which the index files belong.
Optional. Base uri of the repository to which the index files belong.
Creates a new index object by reading one or more index files from a local repository. Accepts the following parameters:
Required. Arrayref of names of index files to be read. Each name must be the name of a plugin under the CPAN::Index::API::File:: namespace, e.g. PackagesDetails, ModList, etc.
CPAN::Index::API::File::
PackagesDetails
ModList
Required. Path to the root of the local repository.
Creates a new index object by reading one or more index files from a remote repository. Accepts the following parameters:
Required. Path to the base uri of the remote repository.
Given the name of a file plugin loaded within the index, returns the object corresponding to this index file.
Returns the path to the repository.
Returns the base uri of the repository.
Writes all index files to their default locations under repo_path.
repo_path
Creates a new instance of this object, overloading any of the existing attributes with any arguments passed.
Peter Shangov <pshangov@yahoo.com>
This software is copyright (c) 2019 by Venda, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install CPAN::Index::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Index::API
CPAN shell
perl -MCPAN -e shell install CPAN::Index::API
For more information on module installation, please visit the detailed CPAN module installation guide.