Scroll to navigation

Pod::Thread(3pm) User Contributed Perl Documentation Pod::Thread(3pm)

NAME

Pod::Thread - Convert POD data to the HTML macro language thread

SYNOPSIS

    use Pod::Thread;
    my $parser = Pod::Thread->new;
    # Read POD from STDIN and write to STDOUT.
    $parser->parse_from_filehandle;
    # Read POD from file.pod and write to file.th.
    $parser->parse_from_file ('file.pod', 'file.th');

DESCRIPTION

Pod::Thread is a module that can convert documentation in the POD format (the preferred language for documenting Perl) into thread, an HTML macro language. It lets the converter from thread to HTML handle some of the annoying parts of conversion to HTML.

As a derived class from Pod::Simple, Pod::Thread supports the same methods and interfaces. See Pod::Simple for all the details; briefly, one creates a new parser with "Pod::Thread->new()", sets the output destination with either output_fh() or output_string(), and then calls one of parse_file(), parse_string_document(), or parse_lines().

new() can take the following options, in the form of key/value pairs, to control the behavior of the formatter:

If set to a true value, output a table of contents section at the beginning of the document. Only top-level headings will be shown.
Sets the CVS Id string for the file. If this isn't set, Pod::Thread will try to find it in the file.
If set to a true value, output a navigation bar at the beginning of the document with links to all top-level headings.
Sets the name of the style sheet to use. If not given, no reference to a style sheet will be included in the generated page.
The title of the document. If this is set, it will be used rather than looking for and parsing a NAME section in the POD file, and NAME sections will no longer be required or special.

DIAGNOSTICS

(F) An error occurred while attempting to write the thread result to the configured output string or file handle.
(F) The POD document being formatted had syntax errors.

AUTHOR

Russ Allbery <rra@cpan.org>, based heavily on Pod::Text from podlators.

COPYRIGHT AND LICENSE

Copyright 2002, 2008-2009, 2013, 2021 Russ Allbery <rra@cpan.org>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Pod::Simple, spin(1)

This module is part of the Pod-Thread distribution. The current version of Pod-Thread is available from CPAN, or directly from its web site at <https://www.eyrie.org/~eagle/software/pod-thread/>.

spin is available from <https://www.eyrie.org/~eagle/software/web/>.

2021-03-28 perl v5.32.1