CPAN::Index::API::Role::Writer - Role for writing index files
version 0.003
This role provides attributes and methods shared between classes that write index files.
Class method that returns a string specifying the path to the default location of this file relative to the repository root.
__DATA__
Consuming packages are expected to have a DATA section that contains the template to use for generating the file contents.
DATA
Required attribute. Boolean - indicates whether the file should be compressed by default. Automatically set to true if the file path in default_location ends in .gz.
default_location
.gz
Optional attribute. Path to the repository root.
Optional attribute. The template to use for generating the index files. The defalt is fetched from the DATA section of the consuming package.
Optional attribute. The index file content. Built by default from the provided "template".
content is a lazy read-only attribute which normally is built only once. Use rebuild_content to generate a new value for content if you've made changes to the list of packages.
content
rebuild_content
This method builds the file content if necessary and writes it to a file. A path to a file to write to can be passed as an argument, otherwise the default location will be used (a .gz suffix, if it exists, will be removed).
This method builds the file content if necessary and writes it to a tarball. A path to a file to write to can be passed as an argument, otherwise the default location will be used.
This method builds the file content if necessary and writes it to the default location.
Peter Shangov <pshangov@yahoo.com>
This software is copyright (c) 2012 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.