Pod::S...e::Wiki(3pm)
π Pod::S...e::Wiki β the perl manual page, but make it make sense π
okay bestie, so this is Pod::S...e::Wiki(3pm), and it lives in the User Contributed Perl Documentation section of your man pages. her whole entire job? turning Perl's own docs into wiki markup. that's it. that's the girl. π
β¨ NAME β¨
Pod::Simple::Wiki β literally a class for creating Pod to Wiki filters. she's the blueprint, the icon, the main character. π
πΈ SYNOPSIS πΈ
so if you wanna build a lil filter that converts Pod into some wiki format, it's giving this:
#!/usr/bin/perl
use strict;
use warnings;
use Pod::Simple::Wiki;
my $parser = Pod::Simple::Wiki->new('kwiki');
if ( defined $ARGV[0] ) {
open IN, $ARGV[0] or die "Couldn't open $ARGV[0]: $!\n";
}
else {
*IN = *STDIN;
}
if ( defined $ARGV[1] ) {
open OUT, ">$ARGV[1]" or die "Couldn't open $ARGV[1]: $!\n";
}
else {
*OUT = *STDOUT;
}
$parser->output_fh( *OUT );
$parser->parse_file( *IN );
__END__
and if you just wanna vibe with the already-installed pod2wiki utility instead of hand-rolling a whole script? say less:
pod2wiki --style mediawiki file.pod > file.wiki
π¦ DESCRIPTION π¦
Pod::Simple::Wiki is the module you use to convert Pod text into Wiki text. no cap.
and for the two people who need the lore: Pod (Plain Old Documentation) is a simple markup language that exists purely to write Perl documentation. she's humble, she's effective, she serves.
a Wiki is a user extensible web site, built on very simple mark-up that gets converted to Html. wanna get introduced properly? the vibes live here: <http://en.wikipedia.org/wiki/Wiki> π«Ά
π METHODS π
new('wiki_format')
the new method does two things and she does them both flawlessly: she creates a brand new Pod::Simple::Wiki object, and she sets the output Wiki format. double duty queen.
my $parser1 = Pod::Simple::Wiki->new( 'wiki' );
my $parser2 = Pod::Simple::Wiki->new( 'mediawiki' );
my $parser3 = Pod::Simple::Wiki->new(); # Defaults to 'wiki'
the formats that are currently supported (aka the current roster, and yes they all ate):
wiki
kwiki
usemod
twiki
tiddlywiki
textile
wikipedia or mediawiki
markdown
moinmoin
confluence
Other methods
Pod::Simple::Wiki inherits all of the methods of Pod::Simple. for more details pls go read Pod::Simple, she's the parent, respect her. π
π Supported Formats π
here's every single wiki format Pod::Simple::Wiki supports, no gatekeeping:
wikiβ the original Wiki format, the one used on Ward Cunningham's Portland repository of Patterns. see: <http://c2.com/cgi/wiki>. she's the blueprint fr fr.kwikiβ the format used by Brian Ingerson's Kwiki: <http://www.kwiki.org>. β¨usemodβ the format used by the Usemod wikis. see: <http://www.usemod.com/cgi-bin/wiki.pl>.twikiβ the format used by TWiki wikis. see: <http://twiki.org/>.tiddlywikiβ the format used by the TiddlyWiki. see: <http://www.tiddlywiki.com/>. πtextileβ the Textile markup format, as used on GitHub. see: <http://textile.thresholdstate.com/>.wikipediaormediawikiβ the format used by Wikipedia and MediaWiki wikis. see: <http://www.mediawiki.org/>. πmarkdownβ the format used by GitHub and other sites. see: <http://daringfireball.net/projects/markdown/syntax>. she's everywhere, it's giving ubiquity.moinmoinβ the format used by MoinMoin wikis. see: <http://moinmo.in/MoinMoinWiki>.museβ Emacs Muse (also known asMuseorEmacs-Muse) is an authoring and publishing environment for Emacs. πΈconfluenceβ the format used by Confluence. see: <http://www.atlassian.com/software/confluence/>.
and the important part bestie: if no format is specified, the parser defaults to wiki. π
any other parameters you drop into new get passed straight on to the parent Pod::Simple object. see Pod::Simple for more details.
π§ Porting New Wiki Formats π§
if you're feeling like a main character and wanna port a new wiki format, go peek at Pod::Simple::Wiki::Template first. she's the starter kit. β¨
the Pod::Simple::Wiki git repository lives at: <http://github.com/jmcnamara/pod-simple-wiki/>.
π₯ SEE ALSO π₯
this module also installs a pod2wiki command line utility. so if you're like "what else can this girl do", just run pod2wiki --help and find out. π
π TODO π
- fix some of the
=overedge cases. see the TODOs in the test programs. (not me being haunted by=overβ¦ π)
π ACKNOWLEDGEMENTS π
giving credit where credit is so beyond due:
- thanks to Sean M. Burke for
Pod::Simple. it may not be simple but sub-classing it is.:-)(that's a genuine little smiley, she earned it) - thanks to Zoffix Znet for various pull requests and fixes.
- thanks to Sam Tregar for TWiki support.
- thanks Tony Sidaway for Wikipedia/MediaWiki support.
- thanks to Daniel T. Staal for Markdown support.
- thanks to Michael Matthews for MoinMoin support.
- thanks to Christopher J. Madsen for several MediaWiki additions and tests.
- thanks Tim Bunce for the TiddlyWiki prod and Ron Savage for the port.
- thanks to Olivier 'dolmen' MenguΓ© for various TiddlyWiki patches.
- thanks to David Bartle, Andrew Hobbs and Jim Renwick for confluence patches.
- thanks to Peter Hallam for MediaWiki enhancements.
- thanks to Marco Pessotto for the Muse format.
π DISCLAIMER OF WARRANTY π
okay this is the serious part, so listen up bestie, no skipping:
because this software is licensed free of charge, there is no warranty for the software, to the extent permitted by applicable law. except when otherwise stated in writing the copyright holders and/or other parties provide the software "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. the entire risk as to the quality and performance of the software is with you. should the software prove defective, you assume the cost of all necessary servicing, repair, or correction.
in no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the software as permitted by the above licence, be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software), even if such holder or other party has been advised of the possibility of such damages.
tl;dr: she's free, she comes as-is, and if she breaks something that's a you problem. π please back up your data.
π LICENSE π
either the Perl Artistic Licence <http://dev.perl.org/licenses/artistic.html> or the GPL <http://www.opensource.org/licenses/gpl-license.php>. pick your fighter. π
β AUTHOR β
John McNamara jmcnamara@cpan.org
π COPYRIGHT π
MMIII-MMIV, 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. π
<div align="center">πΈ π¦ β¨ π π π β¨ π¦ πΈ</div>
and that's the whole page bestie!! this lil writeup shipped as part of perl v5.36.0, dated 2022-10-13, under the ever-iconic Pod::S...e::Wiki(3pm) β go forth and convert some Pod, you've got this π«Άπ
π¦ 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