GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::Auto::Document(3) User Contributed Perl Documentation Test::Auto::Document(3)

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:

Test::Auto::Types

This package has the following attributes:

  content(ArrayRef[Str])

This attribute is read-only, accepts "(ArrayRef[Str])" values, and is optional.

  parser(Parser)

This attribute is read-only, accepts "(Parser)" values, and is required.

  template(Maybe[Str])

This attribute is read-only, accepts "(Maybe[Str])" values, and is optional.

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.

render example #1
  # given: synopsis

  my $rendered = $doc->render;
    
render example #2
  # given: synopsis

  $ENV{TEST_AUTO_TEMPLATE} = './t/Test_Template.pod';

  # where ./t/Test_Template.pod has a {content} placeholder

  my $rendered = $doc->render;

  undef $ENV{TEST_AUTO_TEMPLATE};

  $rendered;
    
render example #3
  # given: synopsis

  my $tmpl = Test::Auto::Document->new(
    parser => $parser,
    template => './t/Test_Template.pod'
  );

  my $rendered = $tmpl->render;
    

Al Newkirk, "awncorp@cpan.org"

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file" <https://github.com/iamalnewkirk/test-auto/blob/master/LICENSE>.

Wiki <https://github.com/iamalnewkirk/test-auto/wiki>

Project <https://github.com/iamalnewkirk/test-auto>

Initiatives <https://github.com/iamalnewkirk/test-auto/projects>

Milestones <https://github.com/iamalnewkirk/test-auto/milestones>

Issues <https://github.com/iamalnewkirk/test-auto/issues>

2020-05-13 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.