Pod::Simple::Texinfo - format Pod as Texinfo
# From the command like
perl -MPod::Simple::Texinfo -e Pod::Simple::Texinfo::go thingy.pod
# From perl
my $new = Pod::Simple::Texinfo->new;
$new->texinfo_sectioning_style('unnumbered');
my $from = shift @ARGV;
my $to = $from;
$to =~ s/\.(pod|pm)$/.texi/i;
$new->parse_from_file($from, $to);
This class is for making a Texinfo rendering of a Pod document.
This is a subclass of Pod::Simple::PullParser and inherits all its methods (and options).
It supports producing a standalone manual per Pod (the default) or render the Pod as a chapter, see "texinfo_sectioning_base_level".
@documentencoding
is not output, which is consistent with outputting Texinfo in UTF-8.
Initialize a parser object.
Run the parser. In general, you should not use this method directly, but instead use parse_file
or similar methods from Pod::Simple.
You can set these attributes on the parser object before you call parse_file
(or a similar method) on it:
If set (the default case), a sectioning command is added at the beginning of the output for the whole document, using the module name, at the level above the level set by "texinfo_sectioning_base_level". So there will be a @part
if the level is equal to 1, a @chapter
if the level is equal to 2 and so on and so forth. If the base level is 0, a @top
command is output instead.
Debug level. Mainly or only used to turn on Texinfo parsing debugging, when Texinfo obtained from Pod is parsed as Texinfo code to be normalized or modified and to report associated Texinfo processing errors. More information output with higher levels. Default 0, no debugging information output.
If set to 0, generate a @ref
with an external manual argument for a reference to an external Pod page. In the default case, an @url
linking to a website collecting CPAN documentation is output for external Pod pages.
If set, generate a @setfilename
line in standalone manuals. Ignored unless "texinfo_sectioning_base_level" is 0.
The argument should be a reference on an array containing the short titles (usually the module names) of all the Pod documents that are converted together and should be internal in the Texinfo document obtained by including all those Pod documents. References to those documents use the internal reference commands formatting in Texinfo. Formatting commands should not be present in these short titles.
Relevant if "texinfo_sectioning_base_level" is not set to 0.
Sectioning style for the main command appearing at the beginning of the output file if "texinfo_sectioning_base_level" not 0. Unset in the default case. If unset, use "texinfo_sectioning_style", except for style heading
, for which the numbered
style is used in the default case.
String used as a prefix for man page urls. Default is http://man.he.net/man
.
String used as a prefix for external Pod if texinfo_external_pod_as_url is set. Default is "perldoc_url_prefix" in Pod::Simple::XHTML.
If set, add @node
and not @anchor
for each sectioning command. Set to 0 in the default case.
Sets the level of the head1 commands. 1 is for the @chapter/@unnumbered level. If set to 0, the head1 commands level is still 1, but the output manual is considered to be a standalone manual. If not 0, the Pod file is rendered as a fragment of a Texinfo manual. Default is 0.
Default is numbered
, using the numbered sectioning Texinfo @-commands (@chapter, @section...). Giving unnumbered
leads to using unnumbered sectioning command variants (@unnumbered
...), giving heading
leads to using headings that are not associated with document structuring (@heading
...) and any other value would lead to using appendix sectioning command variants (@appendix
...).
If set, used as short title. Otherwise, set to the module name with Pod::Simple::PullParser->get_short_title. Can be accessed to get the module name associated with a Pod::Simple::Texinfo
parser.
Pod::Simple. Pod::Simple::PullParser. The Texinfo manual.
Copyright (C) 2011-2024 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
_url_escape
is general_url_escape
from Pod::Simple::HTML.
Patrice Dumas <pertusus@free.fr>. Parts from Pod::Simple::HTML.