DESCRIPTION

Pod::Weaver is a system for building Pod documents from templates. It doesn't perform simple text substitution, but instead builds a Pod::Elemental::Document. Its plugins sketch out a series of sections that will be produced based on an existing Pod document or other provided information.

ATTRIBUTES

logger

This attribute stores the logger, which must provide a log method. The weaver's log method delegates to the logger's log method.

METHODS

plugins_with

This method will return an arrayref of plugins that perform the given role, in the order of their registration. If the role name begins with a hyphen, the method will prepend Pod::Weaver::Role::.

weave_document

my $document = $weaver->weave_document(\%input);

This is the most important method in Pod::Weaver. Given a set of input parameters, it will weave a new document. Different section plugins will expect different input parameters to be present, but some common ones include:

pod_document - a Pod::Elemental::Document for the original Pod document
ppi_document - a PPI document for the source of the module being documented
license - a Software::License object for the source module's license
version - a version (string) to use in produced documentation

The pod_document should have gone through a Pod5 transformer, and should probably have had its =head1 elements nested.

The method will return a new Pod::Elemental::Document. The input documents may be destructively altered during the weaving process. If they should be untouched, pass in copies.