.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PAF 1p" .TH PAF 1p "2020-05-17" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" paf \- Pod Abstract Filter. Transform Pod documents from the command line. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& sh$> \& paf summary /usr/bin/paf \& paf add_podcmds SomeModule.pm \& paf sort \-heading=METHODS Pod/Abstract/Node.pm # METHODS is default \& paf sort summary Pod/Abstract/Node.pm \& \& # See Pod::Abstract::Filter::overlay \& paf overlay sort cut clear_podcmds SomeClass.pm \& \& # \-p will emit pod source, instead of spawning perldoc. \& paf \-p sort Pod::Abstract::Node \& paf \-p find hoist Pod::Abstract::Node .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Paf is a small but powerful, modular Pod filter and transformation tool. It allows full round-trip transformation of Pod documents using the Pod::Abstract library, with multiple filter chains without having to serialise/re\-parse the document at each step. .PP Paf comes with a small set of useful filters, but can be extended by simply writing new classes in the \f(CW\*(C`Pod::Abstract::Filter\*(C'\fR namespace. .SH "FILTERS" .IX Header "FILTERS" .SS "add_podcmds" .IX Subsection "add_podcmds" Add explicit =pod commands at the end of each cut section, so that all pod sections are started with an =pod command. .SS "clear_podcmds" .IX Subsection "clear_podcmds" Remove all =pod commands that are not ending cut blocks. This will clean up documents that have been reduced using the \f(CW\*(C`cut\*(C'\fR filter too. .SS "cut" .IX Subsection "cut" Remove all cut nodes, so that only the pod remains. .SS "overlay" .IX Subsection "overlay" .Vb 1 \& paf overlay Source.pm .Ve .PP For overlay to work, there must be a \f(CW\*(C`begin :overlay/end :overlay\*(C'\fR section in the Source file, with \f(CW\*(C`=overlay SECTION Module\*(C'\fR definitions inside. The net effect is that any missing subheadings in \&\s-1SECTION\s0 are added from the same section in the specified Modules. .PP Note that this will overlay the whole subheading, \s-1INCLUDING CUT NODES,\s0 so it can add code to the source document. Use \f(CW\*(C`cut\*(C'\fR if you don't want this. .PP Each overlaid section will include a \f(CW\*(C`=for overlay from\*(C'\fR marker, so that it can be replaced by a subsequent overlay from the same file/module. These sections will be replaced in-place, so ordering of sections once first overlaid will be preserved. .SS "unoverlay" .IX Subsection "unoverlay" .Vb 1 \& paf unoverlay Source.pm .Ve .PP Strips \fBall\fR sections marked as overlaid and matching the overlay spec from the source. .SS "sort" .IX Subsection "sort" .Vb 1 \& paf sort [\-heading=METHODS] Source.pm .Ve .PP Sort all of the subheadings in the named heading (\s-1METHODS\s0 if not provided). .PP This will move cut nodes around with their headings, so your code will mutate. Use \f(CW\*(C`cut\*(C'\fR if you only want pod in the output. .PP Alternatively, you can also cause sorting of headings to occur by including \f(CW\*(C`=for sorting\*(C'\fR at the start of your section (before the first subheading). .SS "summary" .IX Subsection "summary" Provide an abbreviated summary of the document. If there is a verbatim node in the body of a heading containing the heading name, it will be considered an example and expanded as part of the summary. .SS "find" .IX Subsection "find" .Vb 1 \& paf find [\-f=]name Source.pm .Ve .PP Find specific sub-sections or list items mentioning name. Used to restrict a larger document down to a smaller set that you're interested in. If no \-f is specified, then the word following find will be the search term. .SS "uncut" .IX Subsection "uncut" .Vb 1 \& paf uncut Source.pm .Ve .PP Convert cut nodes in the source into verbatim text. Not the inverse of cut! .SS "number_sections" .IX Subsection "number_sections" .Vb 1 \& paf number_sections Source.pm .Ve .PP Applies simple multipart (3.1.2) section numbering to head1 through head4 headings. .PP Note that number_sections will currently stuff up some of the cleverness in things like summary, as the section names won't match function names any more.