Pod::Weaver::Role::Section::Formattable - Role for a formattable section
This document describes version 0.001 of Pod::Weaver::Role::Section::Formattable - released July 12, 2015 as part of Pod-Weaver-Role-Section-Formattable.
This role is consumed by sections that operate through the mechanism of String::Formatter, namely that they take a format and input data, and generate a top-level section from that.
Generate our default section name.
This is a builder method for the section_name attribute.
section_name
The default string to use as the format, when one has not been specified in the configuration.
This is a builder method for the format attribute.
format
This lazily-built attribute holds our formatter.
This attribute holds the section name a consuming plugin will use.
The string to use when generating the version string.
This method returns a hashref of codes suitable to building a String::Formatter with. For our list of codes, see OVERVIEW, below.
Sections consuming this role should consider creating a additional_codes method, as codes returned by that method will be merged in with our default codes. additional_codes should return a list, not a hashref.
additional_codes
Of course, the choice is yours.
Return the text representing the formatted section. This method is called with the $input taken from weave_section.
$input
weave_section
This method is passed the same $document and $input that the weave_section method is called with, and should return a list of pod elements to insert.
$document
In almost all cases, this method is used internally, but could be usefully overridden in a subclass.
Build our section.
We provide the following codes:
%v - distribution version
%d - distribution name
%p - package name
%{mm} - "main module" name
%{tf} - "trial flag", e.g. "-TRIAL" if trial, an empty string if not
%t - a tab
%n - a newline
Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/pod-weaver-role-section-formattable/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Chris Weyl <cweyl@alumni.drew.edu>
Please note I do not expect to be gittip'ed or flattr'ed for this work, rather it is simply a very pleasant surprise. I largely create and release works like this because I need them or I find it enjoyable; however, don't let that stop you if you feel like it ;)
Flattr, Gratipay, or indulge my Amazon Wishlist... If and *only* if you so desire.
This software is Copyright (c) 2012 by Chris Weyl.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
To install Pod::Weaver::Role::Section::Formattable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Weaver::Role::Section::Formattable
CPAN shell
perl -MCPAN -e shell install Pod::Weaver::Role::Section::Formattable
For more information on module installation, please visit the detailed CPAN module installation guide.