Test::Auto::Document
Documentation Generator
package main; use Test::Auto; use Test::Auto::Parser; use Test::Auto::Document; my $test = Test::Auto->new( 't/Test_Auto.t' ); my $parser = Test::Auto::Parser->new( source => $test ); my $doc = Test::Auto::Document->new( parser => $parser ); # render documentation # $doc->render
This package use the Test::Auto::Parser object to generate a valid Perl 5 POD document.
This package uses type constraints from:
Data::Object::Library
This package has the following attributes:
content(ArrayRef[Str])
This attribute is read-only, accepts (ArrayRef[Str]) values, and is optional.
(ArrayRef[Str])
parser(InstanceOf["Test::Auto::Parser"])
This attribute is read-only, accepts (InstanceOf["Test::Auto::Parser"]) values, and is required.
(InstanceOf["Test::Auto::Parser"])
template(Maybe[Str])
This attribute is read-only, accepts (Maybe[Str]) values, and is optional.
(Maybe[Str])
This package implements the following methods:
render() : Str
This method returns a string representation of a valid POD document. You can also provide a template to wrap the generated document by passing it to the constructor or specifying it in the TEST_AUTO_TEMPLATE environment variable.
TEST_AUTO_TEMPLATE
# given: synopsis my $rendered = $doc->render;
# given: synopsis $ENV{TEST_AUTO_TEMPLATE} = './t/Test_Template.pod'; # where ./TEMPLATE has a {content} placeholder my $rendered = $doc->render; undef $ENV{TEST_AUTO_TEMPLATE}; $rendered;
# given: synopsis my $tmpl = Test::Auto::Document->new( parser => $parser, template => './t/Test_Template.pod' ); my $rendered = $tmpl->render;
To install Test::Auto, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Auto
CPAN shell
perl -MCPAN -e shell install Test::Auto
For more information on module installation, please visit the detailed CPAN module installation guide.