
Contentment::Generator::POD - A generator for Plain Old Documentation

$source = <<'END_OF_POD';
=head1 NAME
Test - This is a test.
=head1 DESCRIPTION
This is a little test of L<Contentment::Gneerator::POD>.
=cut
END_OF_POD
my $generator = Contentment::Generator::POD->new({
properties => {
foo => 1,
bar => 2,
},
source => $source,
});
my $title = $generator->get_property('title');
my $description = $generator->get_property('description');
$generator->generate();

This is a generated specifically geared for use with Perl's POD, or Plain Old Documentation, format. This class inherits from Contentment::Generator::Plain.
This constructs a POD generator. It takes the following arguments.
This option specifies the source to use for the documentation. It may be specified in any of the forms that Contentment::Generator::Plain supports.
This specifies any properties you want to give generator. This properties will be overridden by any properties specified within the file itself. Properties may be specified in the file itself in four different ways.
=begin meta section:
=begin meta
foo => 1
bar => 'A string.'
=end meta
=cut
The properties are specified using a hash-like syntax where the keys may be placed within quotes or not and the values may be placed in quotes or not. The parser for this is pretty simple, so try to stick to the simple stuff as the above.
=for meta section:
=for meta
foo => 1
bar => 'A string.'
new_paragraph => 'NOT A PROPERTY!'
=cut
This is exactly the same as the =begin meta section, but a =for meta section lasts until a new paragraph is started.
=head1 NAME Title - This is the description =cut
This will create a property named "title" with the value "Title" and a property named "description" with the value "This is the description".
This is in following with the standard man-page convention that most POD files follow.
=head1 This is the Title =cut
Would result in a property named "title" with the value "This is the Title" being stored.
If two or more methods are used to define the same property, the way the values clobber each other isn't well-defined.
This overrides the method provided by Contentment::Generator::PLain. In addition to reading the source, this method also parses properties out of the source.
Returns the hash of properties for the generator. This will include any properties found in the source.

Contentment::Generator::Plain, Contentment::Generator::PerlScript, perlpod

Andrew Sterling Hanenkamp, <hanenkamp@users.sourceforege.net>

Copyright 2005 Andrew Sterling Hanenkamp. All Rights Reserved.
Contentment is distributed and licensed under the same terms as Perl itself.