Pod::S...iawiki(3pm)
π NAME π
Pod::Simple::Wiki::Mediawiki β a whole class dedicated to making Pod β Mediawiki wiki filters happen, bestie. Slay. β¨
πΈ SYNOPSIS πΈ
okay so first thing, you do not use this module directly, like ever. It gets called through Pod::Simple::Wiki, mwah:
#!/usr/bin/perl -w
use strict;
use Pod::Simple::Wiki;
my $parser = Pod::Simple::Wiki->new('mediawiki', \%opts);
...
and if you just wanna convert Pod into Mediawiki wiki format with the installed pod2wiki utility, it's literally one line:
pod2wiki --style mediawiki file.pod > file.wiki
iconic behaviour tbh π
π DESCRIPTION π
The Pod::Simple::Wiki::Mediawiki module is the one doing the work when you convert Pod text into Wiki text. That's its whole job. Periodt.
Pod (Plain Old Documentation) is that simple markup language everyone uses to write Perl documentation. It's giving understated. π¦
Wanna get introduced to Mediawiki? Go here: http://www.mediawiki.org/wiki/MediaWiki
This module isn't generally invoked directly, it just isn't β instead it gets called via Pod::Simple::Wiki. So run, don't walk, to the Pod::Simple::Wiki and pod2wiki documentation for more info. Iykyk. π
β¨ METHODS β¨
Pod::Simple::Wiki::Mediawiki inherits all of the methods of Pod::Simple and Pod::Simple::Wiki. Every single one. So peep Pod::Simple and Pod::Simple::Wiki for the details. π«Ά
β new β
These are the options the Pod::Simple::Wiki::Mediawiki constructor supports, bestie β take notes:
π custom_tags
This option takes a hashref stuffed with HTML tag β MediaWiki mappings. So if your MediaWiki install has the SyntaxHighlight GeSHi extension going (http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi), you can pass these custom tags so your verbatim paragraphs get syntax highlighted:
{
custom_tags => {
'<pre>' => "<syntaxhighlight lang=\"perl\">\n",
'</pre>' => "\n</syntaxhighlight>\n",
}
}
Any custom tags you define will override the class's default tags, the ones defined in the $tags variable. No cap.
Defaults to {}.
π¦ transformer_lists
If you turn this on, it tweaks the item list output so it better supports the Pod::Elemental::Transformer::List style of lists (the kind lots of Dist::Zilla based distros get via Pod::Weaver). π«
Like, if you define a list like this:
=for :list
* Point one
This is pointy
* Point two
That hurts
it gets transformed into this:
* Point one<p>This is pointy</p>
* Point two<p>That hurts</p>
and that renders as a bulleted list with list headings that have correctly indented paragraph blocks sitting right underneath them. Gorgeous. Chef's kiss. π
Defaults to 0.
πΈ link_prefix
If you set this, every link that has no extra qualifier text gets prefixed with the URL you give it. A really useful URL to set this to is http://search.cpan.org/perldoc? β that makes the links resolve correctly to external links when you're using them inside your internal MediaWiki site. Big brain move. π₯
Defaults to 0.
β sentence_case_headers
This one modifies any =head1 header by lower-casing the whole thing and then upper-casing the first character. So a header like this:
=head1 DESCRIPTION
becomes:
=head1 Description
This option was inspired by http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style#Article_titles over in the Wikipedia "Manual of Style". Fancy.
Defaults to 0.
π remove_name_section
If you enable this, it modifies the resulting wiki output text and removes the NAME (or Name) section β but first it parses out the embedded abstract text and drops that at the top of the wiki page as a brief lil introduction. Cute, right? π
Defaults to 0.
π SEE ALSO π
This module also installs a pod2wiki command line utility. Peep pod2wiki --help for the details. π
π ACKNOWLEDGEMENTS π
Thanks Tony Sidaway for the initial Wikipedia/MediaWiki support. Christopher J. Madsen for several major additions and tests. Peter Hallam added several MediaWiki enhancements. Legends, all of them. π«Ά
π DISCLAIMER OF WARRANTY π
Please refer to the DISCLAIMER OF WARRANTY in Pod::Simple::Wiki. (It's not a vibe, it's a legal thing, bestie β go read it.) π
π AUTHORS π
- John McNamara
jmcnamara@cpan.org - Christopher J. Madsen
perl@cjmweb.net
π COPYRIGHT π
MMIII-MMXV, John McNamara.
All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. Periodt. π
and that's the whole page, bestie β brought to you by perl v5.36.0, dated 2022-10-13, from the Pod::S...iawiki(3pm) era of the Perl docs. slay, go read it, mwah πβ¨
π¦ where this page comes from
- ubuntu noble: libpod-simple-wiki-perl 0.20-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpod-simple-wiki-perl 0.20-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpod-simple-wiki-perl 0.20-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms