# NAME Pod::Knit - Stitches together POD documentation # VERSION version 0.0.1 # SYNOPSIS ```perl my $knit = Pod::Knit->new( config => { plugins => [ 'Abstract', 'Version', { Sort => { order => [qw/ NAME * VERSION /] }, ] }); print $knit->munge_document( file => './lib/Pod/Knit.pm' )->as_string; ``` # DESCRIPTION `Pod::Knit` is a POD processor heavily inspired by [Pod::Weaver](https://metacpan.org/pod/Pod::Weaver). The main difference being that `Pod::Weaver` uses a [Pod::Elemental](https://metacpan.org/pod/Pod::Elemental) DOM to represent and transform the POD document, whereas `Pod::Knit` uses representation of the document (the tags used in that representation are given in [Pod::Knit::Document](https://metacpan.org/pod/Pod::Knit::Document)). This module mostly take care of taking in the desired configuration, and transform POD documents based on it. For documentation of the system as a whole, peer at [Pod::Knit::Manual](https://metacpan.org/pod/Pod::Knit::Manual). # attributes ### config\_file Configuration file for the knit pipeline. Must be a YAML file. E.g.: \--- stash: author: Yanick Champoux plugins: - Abstract - Attributes - Methods - NamedSections: sections: - synopsis - description - Version - Authors - Legal - Sort: order: - NAME - VERSION - SYNOPSIS - DESCRIPTION - ATTRIBUTES - METHODS - '\*' - AUTHORS - AUTHOR - COPYRIGHT AND LICENSE #### `./knit.yml` if the file exists. ### config Hashref of the configuration for the knit pipeline. The configuration recognizes two keys: `stash`, which value is a hashref of configuration elements to pass to the plugins, and `plugins`, the arrayref of plugins and (optionally) their arguments. See `config_file` for an example. #### the content of the `config_file`, if it exists. ### stash Hashref of values accessible to the knit pipeline. Can be used to set values required by various plugins, like the distribution's version, the list of authors, etc. #### the `stash` value of the config attribute, if presents. Else an empty hashref. # methods ### munge\_document ```perl my $doc = $knit->munge_document( %args ) my $doc = $knit->munge_document( $original ) ``` Takes a [Pod::Knit::Document](https://metacpan.org/pod/Pod::Knit::Document) and returns a new document munged by the plugins. If the input is `%args`, it is a shortcut for ```perl my $doc = $knit->munge_document( Pod::Knit::Document->new( knit => $knit, %args ) ); ``` # AUTHOR Yanick Champoux [![endorse](http://api.coderwall.com/yanick/endorsecount.png)](http://coderwall.com/yanick) # COPYRIGHT AND LICENSE This software is copyright (c) 2018 by Yanick Champoux. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Full text of the license can be found in the `LICENSE` file included in this distribution.