Pod::POM

Pod::POM is a POD Object Model.
Download

Pod::POM Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Andy Wardley
  • Publisher web site:
  • http://search.cpan.org/~abw/

Pod::POM Tags


Pod::POM Description

Pod::POM is a POD Object Model. Pod::POM is a POD Object Model.SYNOPSIS use Pod::POM; my $parser = Pod::POM->new(%options); # parse from a text string my $pom = $parser->parse_text($text) || die $parser->error(); # parse from a file specified by name or filehandle my $pom = $parser->parse_text($file) || die $parser->error(); # parse from text or file my $pom = $parser->parse($text_or_file) || die $parser->error(); # examine any warnings raised foreach my $warning ($parser->warnings()) { warn $warning, "n"; } # print table of contents using each =head1 title foreach my $head1 ($pom->head1()) { print $head1->title(), "n"; } # print each section foreach my $head1 ($pom->head1()) { print $head1->title(), "n"; print $head1->content(); } # print the entire document as HTML use Pod::POM::View::HTML; print Pod::POM::View::HTML->print($pom); # create custom view package My::View; use base qw( Pod::POM::View::HTML ); sub view_head1 { my ($self, $item) = @_; return '< h1 >', $item->title->present($self), "< /h1 >n", $item->content->present($self); } package main; print My::View->print($pom);This module implements a parser to convert Pod documents into a simple object model form known hereafter as the Pod Object Model. The object model is generated as a hierarchical tree of nodes, each of which represents a different element of the original document. The tree can be walked manually and the nodes examined, printed or otherwise manipulated. In addition, Pod::POM supports and provides view objects which can automatically traverse the tree, or section thereof, and generate an output representation in one form or another. Requirements: · Perl


Pod::POM Related Software