NAME

Pod::Knit::Document

VERSION

version 0.0.1

SYNOPSIS

use Pod::Knit::Document;

my $doc = Pod::Knit::Document->new( file => 'Foo.pm' );

say $doc->as_code;
say $doc->as_pod;
say $doc->as_string;

DESCRIPTION

Represents a document (a Perl module or script) that is to be munged by <Pod::Knit> plugins.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 46:

attributes

knit

Main Pod::Knit object from which the document was (potentially) created. Optional.

plugins

ArrayRef of plugins used on this document. Plugins that have a setup_podparser method will be used when setting up the podparser.

Defaults to the plugins associated with the master Pod::Knit object as defined in knit.

file

Filename of the document. Optional.

content

Original content of the document. If not provided, defaults to the content of file.

xml_pod

XML representation of the POD. The base tags used by standard POD are

whole document     | <document>
=headN Foo         | <head*N*>
=over ... =back    | <over-text>
=item title        | <item-text>title</item-text>
paragraph          | <para>
verbatim           | <verbatimformatted>
B<>, I<>, C<> L<>  | <b>, <i>, <c> <l>

All tags have a start_line attribute indicating the first line in the source file.

methods

podparser

Creates a Pod::Knit::PodParser parser. All found setup_podparser plugin methods found will be invoked with the parser as its first argument, giving the plugins a chance to define new tags and the like.

clone

Creates a new Pod::Knit::Document object cloning the data of the current one.

as_code

Returns the code part of the document (i.e., all that is not POD).

as_pod

Returns the POD. Generated by Pod::Knit::Output::Pod.

as_string

Returns the whole document, code and POD.

AUTHOR

Yanick Champoux <yanick@cpan.org>

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.