Plain Old Documentation - Pod Formatting Details

Pod Formatting Details

pod files are written in an ASCII-compatible encoding, such as Latin-1 or UTF-8. A pod parser always assumes that the file it is parsing doesn't start with pod; it ignores all lines until it sees a pod directive. pod directives must come at the beginning of a line, and all begin with an equal sign. The pod parser will then assume that all following lines are pod, until it encounters a line consisting of the "=cut" directive. Any content following that is ignored until the parser encounters another pod directive. Thus, pod can be intermixed with executable source code if the language's parser knows how to recognize and ignore pod.

pod content is divided into paragraphs by empty lines. Paragraphs that begin with whitespace characters—tabs or spaces—are considered to be "verbatim paragraphs", and are left completely unformatted; these are used for sample code, ASCII art, etc. Paragraphs that begin with an equal sign are "command paragraphs"; the sequence of alphanumeric characters immediately following the equal sign is treated as a pod directive, and the rest of the paragraph is formatted according to that directive. Some directives also affect the following paragraphs. If a paragraph starts with something besides an equal sign or whitespace, it's considered an "ordinary paragraph".

Both ordinary paragraphs and the contents of command paragraphs are parsed for formatting codes. Formatting in pod is very plain; it's mainly limited to bold, italic, underlined, monospaced, and a few other formats. There is also a code for linking between pod documents or to another section within the same document. Formatting codes consist of either:

  • A single uppercase letter, followed by a less-than sign (<), the content to be formatted, and a greater-than sign (>), e.g. B, or
  • A single uppercase letter, two or more less-than signs (<<), a space, the content to be formatted, another space, and the same number of greater-than signs as were used before, e.g. B<< bolded text >>. This form is often used for code snippets containing a greater-than sign, which would otherwise end the formatting code.

Commands in pod include four levels of headings, bulleted and numbered lists, and commands to mark sections as being in another language. The latter feature allows for special formatting to be given to parsers that support it.

Read more about this topic:  Plain Old Documentation

Famous quotes containing the word details:

    Patience is a most necessary qualification for business; many a man would rather you heard his story than granted his request. One must seem to hear the unreasonable demands of the petulant, unmoved, and the tedious details of the dull, untired. That is the least price that a man must pay for a high station.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)