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::Parser, Pod::Thread supports the same methods and interfaces. See Pod::Parser for all the details; briefly, one creates a new parser with Pod::Thread->new() and then calls either parse_from_filehandle() or parse_from_file().

new() can take options, in the form of key/value pairs that control the behavior of the parser. See below for details.

The standard Pod::Parser method parse_from_filehandle() takes up to two arguments, the first being the file handle to read POD from and the second being the file handle to write the formatted output to. The first defaults to STDIN if not given, and the second defaults to STDOUT. The method parse_from_file() is almost identical, except that its two arguments are the input and output disk files instead. See Pod::Parser for the specific details.

The recognized options to new() are as follows. All options take a single argument.

contents

Asks for a table of contents section at the beginning of the document. Should be set to a hash table mapping section headers to section numbers prefixed by S (for internal links).

id

Sets the CVS Id string for the file. If this isn't set, Pod::Thread will try to find it in the file, but will only successfully find it if it occurs before the beginning of any POD in the input file.

navbar

Asks for a navigation bar at the beginning of the document. Should be set to a hash table mapping section headers to section numbers prefixed by S (for internal links).

style

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.

title

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

Cannot write to output: %s

(F) An error occurred while attempting to write the thread result to the configured output string or file handle.

POD document had syntax errors

(F) The POD document being formatted had syntax errors.

SEE ALSO

Pod::Parser, spin(1)

Current versions of this program are available from my web tools page at <http://www.eyrie.org/~eagle/software/web/>. spin is available from the same page.

AUTHOR

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

COPYRIGHT AND LICENSE

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

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Last spun 2014-04-21 from POD modified 2014-04-14