26 Dec 2021 19:16:58 UTC
- Distribution: Pod-Thread
- Module version: 3.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (368 / 0 / 27)
- KwaliteeBus factor: 1
- 94.93% Coverage
- License: mit
- Perl: v5.24.0
- Activity24 month
- Download (48.35KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionRRA Russ Allbery
Pod::Thread - Convert POD data to the HTML macro language thread
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');
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:
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.
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.
- 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.
Russ Allbery <email@example.com>, based heavily on Pod::Text from podlators.
Copyright 2002, 2008-2009, 2013, 2021 Russ Allbery <firstname.lastname@example.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.
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/.