-
-
13 Apr 2019 21:53:04 UTC
- Distribution: CPAN-Index-API
- Module version: 0.008
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (284 / 11 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (31.44KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Peter Shangov
- Dependencies
- Carp
- Class::Load
- Compress::Zlib
- File::Basename
- File::Temp
- LWP::Simple
- List::Util
- Moose
- Moose::Role
- Moose::Util::TypeConstraints
- MooseX::ClassAttribute
- Path::Class
- Path::Tiny
- Scalar::Util
- Symbol
- Text::Template
- URI
- URI::file
- XML::Twig
- base
- namespace::autoclean
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
CPAN::Index::API - Read and write CPAN index files
SYNOPSIS
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');
DESCRIPTION
CPAN::Index::API
is a library to read and write CPAN index files. See the modules in theCPAN::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.
CONSTRUCTION
new
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.
new_from_repo_path
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.
new_from_repo_uri
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.
METHODS
file
Given the name of a file plugin loaded within the index, returns the object corresponding to this index file.
repo_path
Returns the path to the repository.
repo_uri
Returns the base uri of the repository.
write_all_files
Writes all index files to their default locations under
repo_path
.clone
Creates a new instance of this object, overloading any of the existing attributes with any arguments passed.
AUTHOR
Peter Shangov <pshangov@yahoo.com>
COPYRIGHT AND LICENSE
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.
Module Install Instructions
To install CPAN::Index::API, copy and paste the appropriate command in to your terminal.
cpanm CPAN::Index::API
perl -MCPAN -e shell install CPAN::Index::API
For more information on module installation, please visit the detailed CPAN module installation guide.