logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

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

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.

       Pod::Thread is primarily intended for use with the DocKnot static site generator (the App::DocKnot::Spin
       module), which implements the thread macro language.  This module provides POD formatting into thread and
       thus to HTML.

       As a derived class from Pod::Simple, Pod::Thread supports the same methods and interfaces.  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().  See
       Pod::Simple for all the details.

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

       contents
           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.

       navbar
           If set to a true value, output a navigation bar at the beginning of the document with  links  to  all
           top-level headings.

       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.

Name

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

See Also

       App::DocKnot::Spin, Pod::Simple, docknot(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/>.

       DocKnot is available as the App-DocKnot distribution  from  CPAN,  or  directly  from  its  web  site  at
       <https://www.eyrie.org/~eagle/software/docknot/>.

perl v5.32.1                                       2021-12-26                                   Pod::Thread(3pm)

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');

See Also