Pod::PP

Pod::PP is a POD pre-processor.
Download

Pod::PP Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Raphael Manfredi
  • Publisher web site:
  • http://search.cpan.org/~mrogaski/Log-Agent-0.307/Agent/Tag/Callback.pm

Pod::PP Tags


Pod::PP Description

Pod::PP is a POD pre-processor. Pod::PP is a POD pre-processor.SYNOPSIS # normally used via the podpp script require Pod::PP; my $pp = Pod::PP->make( -incpath => , -symbols => { DIR => "/var/www", TMPDIR => "/var/tmp" }, ); $pp->parse_from_filehandle(*STDIN); $pp->parse_from_file("file.pp");The Pod::PP module is a POD pre-processor built on top of Pod::Parser. The helper script podpp provides a pre-processor command for POD, whose interface is very much like cpp, the C pre-processor. However, unlike C, the Pod::PP processing is not normally invoked when parsing POD.If you wish to automate the pre-processing for every POD file, you need to write .pp files (say) instead of .pod files, and add the following make rules to your Makefile: PODPP = podpp PP_FLAGS = .SUFFIXES: .pp .pod .pp.pod: $(PODPP) $(PP_FLAGS) $< >$*.podThose teach make how to derive a .pod from a .pp file using the podpp pre-processor.Pod::PP uses the P notation to request symbol expansion. Since it processes text, you need to tag the symbols to be expanded explicitely. Expansion is done recursively, until there is no more expansion possible.If you are familiar with cpp, most directives will be easy to grasp. For instance, using the == prefix to make shorter commands: ==pp include "common.pp" ==pp define DIR /var/www ==pp define TMP /tmp ==pp ifdef SOME_COMMON_SYMBOL ==pp define FOO common foo ==pp else ==pp define FOO P ==pp endifThe == notation is not standard POD, but it is understood by Pod::Parser and very convenient when it comes to writing things like the above block, because there's no need to separate commands by blank lines. Since the code is going to be processed by podpp anyway, there's no problem, and podpp will always emit legitimate POD. That is, given the following: ==head1 NAME Some datait will re-emit: =head1 NAME Some datathereby normalizing the output. It is guaranteed that after a podpp pass, the output is regular POD. If you make errors in writing the Pod::PP directives, you will not get the expected output, but it will be regular POD. Requirements: · Perl


Pod::PP Related Software