NAME
Pod::DokuWiki - Convert POD to DokuWiki
SYNOPSIS
use Pod::DokuWiki;
my $parser = Pod::DokuWiki->new;
$parser->output_fh(\*STDOUT);
# -or-
$parser->output_string(\my $result);
$parser->parse_file(\*STDIN);
# -or-
$parser->parse_string_document($pod);
DESCRIPTION
This module converts POD to DokuWiki syntax. The conversion is "best-effort" because DokuWiki cannot represent all POD elements faithfully (in particular, DokuWiki lists are fairly limited).
In addition to regular POD markup, this module picks up sections labeled highlighter and dokuwiki.
highlighter-
A directive like
=for highlighter language=perlmarks the language of all following code blocks (until the next=for highlighterdirective). This affects syntax highlighting in DokuWiki. dokuwiki-
Any code between
=begin dokuwikiand=end dokuwikiis included verbatim in the generated document. This lets you add custom DokuWiki markup (e.g. for images or tables).
Methods
Pod::DokuWiki subclasses Pod::Simple, which see for the main methods to specify the input/output for the conversion: "MAIN METHODS" in Pod::Simple.
In addition, the new constructor optionally accepts the following named parameters to customize the behavior of the converter:
resolve_man_link-
Code reference. Called with 3 arguments: The section number, the page name, and the POD "section" (page part) to link to. (The latter is normally
undef.)For example,
L<man(1)>calls this function with('1', 'man', undef)andL<termcap(5)/SEE ALSO>calls it with('5', 'termcap', 'SEE ALSO').Must return a URL.
resolve_pod_link-
Code reference. Called with 2 arguments: The module or perldoc page name, and the section to link to. Either of these arguments (but not both) may be
undef.For example,
L<Scalar::Util>calls this function with('Scalar::Util', undef),L</SYNOPSIS>calls it with(undef, 'SYNOPSIS'), andL<Scalar::Util/SYNOPSIS>calls it with('Scalar::Util', 'SYNOPSIS').Must return a URL.
The default implementation resolves perldoc pages (matching
/^perl\w*\z/) to https://perldoc.perl.org/ and anything else to https://metacpan.org/.
SEE ALSO
AUTHOR
Lukas Mai, <l.mai at web.de>
COPYRIGHT & LICENSE
Copyright © 2026 Lukas Mai.
This program 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.
See https://www.gnu.org/licenses/ for more information.