Pod::Elemental::Transformer::Include - include output via files and commands
version 1.001
=head1 DIRECTORY LISTING include_file:header.txt include_cmd:ls include_cmd:blah include_file:footer.txt
A simple way to include files and output of commands in POD via Pod::Weaver.
There are two supported identifiers include_file: and include_cmd:. They must be placed at the beginning of the line optionally followed by white space. When there is white space then the every line of output included will be prefixed with that same amount of white space. For example,
include_file:
include_cmd:
include_cmd:echo no white space
becomes,
no white space
Where as,
include_cmd: echo 4 spaces
4 spaces
Errors are not fatal. But, you will see if something failed by prints to standard output.
include_file: - Replaces line with the file contents and does no transformation on the data.
include_cmd: - Replaces the line with the command output and does no transformation on the data.
Be careful what you execute with include_cmd:.
There may be another eloquent and preferred way, but I've gone with a Pod::Weaver PluginBundle in conjunction with Dist::Zilla. A quick howto:
First setup a PluginBundle:
package Pod::Weaver::PluginBundle::aflott; sub mvp_bundle_config { return ( [ '@aflott/Default', 'Pod::Weaver::PluginBundle::Default', {} ], [ '@aflott/List', 'Pod::Weaver::Plugin::Transformer', { 'transformer' => 'List' } ], [ '@aflott/Include', 'Pod::Weaver::Plugin::Transformer', { 'transformer' => 'Include' } ], ); }
Then insider your dist.ini,
[PodWeaver] config_plugin = @aflott
And now,
$ dzil build
You can find documentation for this module with the perldoc command.
perldoc Pod::Elemental::Transformer::Include
You can also look for information at:
RT: CPAN's request tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Pod-Elemental-Transformer-Include
AnnoCPAN: Annotated CPAN documentation: http://annocpan.org/dist/Pod-Elemental-Transformer-Include
CPAN Ratings: http://cpanratings.perl.org/d/Pod-Elemental-Transformer-Include
Search CPAN: http://search.cpan.org/dist/Pod-Elemental-Transformer-Include
Adam Flott <adam@npjh.com>
This software is copyright (c) 2010 by Adam Flott.
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 Pod::Elemental::Transformer::Include, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Elemental::Transformer::Include
CPAN shell
perl -MCPAN -e shell install Pod::Elemental::Transformer::Include
For more information on module installation, please visit the detailed CPAN module installation guide.