X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlpod.pod;h=9fc7bed6632f3e83a811cdeefdc6c813de42c157;hb=83ce3e12e086bc5a21f37af9378b7c01fa5d73d8;hp=955d706ef8357bd22d35891d6ac9e58bf8d7aa9c;hpb=a179871ba0a4416951234c6b0cf01884909b8e1f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlpod.pod b/pod/perlpod.pod index 955d706..9fc7bed 100644 --- a/pod/perlpod.pod +++ b/pod/perlpod.pod @@ -4,6 +4,7 @@ This document is in Pod format. To read this, use a Pod formatter, like "perldoc perlpod". =head1 NAME +X X perlpod - the Plain Old Documentation format @@ -22,6 +23,7 @@ L. =head2 Ordinary Paragraph +X Most paragraphs in your documentation will be ordinary blocks of text, like this one. You can simply type in your text without @@ -37,6 +39,7 @@ section, below. =head2 Verbatim Paragraph +X X Verbatim paragraphs are usually used for presenting a codeblock or other text which does not require any special parsing or formatting, @@ -51,6 +54,7 @@ nothing else. =head2 Command Paragraph +X A command paragraph is used for special treatment of whole chunks of text, usually as headings or parts of lists. @@ -60,6 +64,7 @@ with "=", followed by an identifier, followed by arbitrary text that the command can use however it pleases. Currently recognized commands are + =pod =head1 Heading Text =head2 Heading Text =head3 Heading Text @@ -67,17 +72,19 @@ are =over indentlevel =item stuff =back - =cut - =pod =begin format =end format =for format text... + =encoding type + =cut To explain them each in detail: =over =item C<=head1 I> +X<=head1> X<=head2> X<=head3> X<=head4> +X X X X =item C<=head2 I> @@ -102,6 +109,7 @@ Such commands are explained in the "L" section, below. =item C<=over I> +X<=over> X<=item> X<=back> X X X =item C<=item I> @@ -157,6 +165,7 @@ list. =back =item C<=cut> +X<=cut> X To end a Pod block, use a blank line, then a line beginning with "=cut", and a blank @@ -165,6 +174,7 @@ this is where Perl code is resuming. (The blank line before the "=cut" is not technically necessary, but many older Pod processors require it.) =item C<=pod> +X<=pod> X The "=pod" command by itself doesn't do much of anything, but it signals to Perl (and Pod formatters) that a Pod block starts here. A @@ -191,6 +201,7 @@ paragraph or a verbatim paragraph. For example: =cut =item C<=begin I> +X<=begin> X<=end> X<=for> X X X =item C<=end I> @@ -203,7 +214,7 @@ formatter that can use that format will use the region, otherwise it will be completely ignored. A command "=begin I", some paragraphs, and a -command "=end I", mean that the text/data inbetween +command "=end I", mean that the text/data in between is meant for formatters that understand the special format called I. For example, @@ -270,6 +281,7 @@ normal formatting (e.g., may not be a normal-use paragraph, but might be for formatting as a footnote). =item C<=encoding I> +X<=encoding> X This command is used for declaring the encoding of a document. Most users won't need this; but if your encoding isn't US-ASCII or Latin-1, @@ -321,6 +333,8 @@ Some examples of lists include: =head2 Formatting Codes +X X +X X In ordinary paragraphs and in some command paragraphs, various formatting codes (a.k.a. "interior sequences") can be used: @@ -332,11 +346,13 @@ formatting codes (a.k.a. "interior sequences") can be used: =over =item CtextE> -- italic text +X X<< IZ<><> >> X X Used for emphasis ("Ccareful!E>") and parameters ("CLABELE>") =item CtextE> -- bold text +X X<< BZ<><> >> X X Used for switches ("C-nE switch>"), programs ("CchfnE for that>"), @@ -344,12 +360,14 @@ emphasis ("Ccareful!E>"), and so on ("CautovivificationE>"). =item CcodeE> -- code text +X X<< CZ<><> >> X X Renders code in a typewriter font, or gives some other indication that this represents program text ("Cgmtime($^T)E>") or some other form of computerese ("Cdrwxr-xr-xE>"). =item CnameE> -- a hyperlink +X X<< LZ<><> >> X X There are various syntaxes, listed below. In the syntaxes given, C, C, and C
cannot contain the characters @@ -406,8 +424,7 @@ CPerl Error Messages|perldiagE> Ctext|name/"sec"E> or Ctext|name/secE> Link this text to that section in that manual page. E.g., -CSWITCH statements|perlsyn/"Basic BLOCKs and Switch -Statements"E> +Cpostfix "if"|perlsyn/"Statement Modifiers"E> =item * @@ -435,6 +452,7 @@ various reasons. =back =item CescapeE> -- a character escape +X X<< EZ<><> >> X X Very similar to HTML/XML C<&I;> "entity references": @@ -487,21 +505,26 @@ rendering CeacuteE> as just a plain "e".) =back =item CfilenameE> -- used for filenames +X X<< FZ<><> >> X X Typically displayed in italics. Example: "C.cshrcE>" =item CtextE> -- text contains non-breaking spaces +X X<< SZ<><> >> X +X This means that the words in I should not be broken across lines. Example: S$x ? $y : $zE>>. =item Ctopic nameE> -- an index entry +X X<< XZ<><> >> X X This is ignored by most formatters, but some may use it for building indexes. It always renders as empty-string. Example: Cabsolutizing relative URLsE> =item CE> -- a null (zero-effect) formatting code +X X<< ZZ<><> >> X X This is rarely used. It's one way to get around using an EE...E code sometimes. For example, instead of @@ -538,6 +561,7 @@ angle brackets ("<<" and ">>") may be used I For example, the following will do the trick: +X C<< $a <=> $b >> @@ -547,6 +571,7 @@ delimiters, and make sure that whitespace immediately follows the last '<' of the opening delimiter, and immediately precedes the first '>' of the closing delimiter. (The whitespace is ignored.) So the following will also work: +X C<<< $a <=> $b >>> C<<<< $a <=> $b >>>> @@ -576,6 +601,7 @@ and any other pod2xxx or Pod::Xxxx translators that use Pod::Parser 1.093 or later, or Pod::Tree 1.02 or later. =head2 The Intent +X The intent is simplicity of use, not power of expression. Paragraphs look like paragraphs (block format), so that they stand out @@ -595,6 +621,7 @@ B. Various others are available in CPAN. =head2 Embedding Pods in Perl Modules +X You can embed Pod documentation in your Perl modules and scripts. Start your documentation with an empty line, a "=head1" command at the @@ -618,6 +645,7 @@ have recognized the "=head1" as starting a Pod block. =over =item * +X X The B command is provided for checking Pod syntax for errors and warnings. For example, it checks for completely blank lines in