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.
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:
-
files
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. -
repo_path
Optional. Path to the root of the repository to which the index files belong.
-
repo_uri
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:
-
files
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. -
repo_path
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:
-
files
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. -
repo_uri
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
.
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.