Pod::S...emplate(3pm)
π NAME π
Pod::Simple::Wiki::Template β bestie, it's literally a class for creating Pod to Template wiki filters β¨ no cap.
π¦ SYNOPSIS π¦
Okay so real talk: this module is not used directly. It gets called through Pod::Simple::Wiki, like this:
#!/usr/bin/perl -w
use strict;
use Pod::Simple::Wiki;
my $parser = Pod::Simple::Wiki->new('template');
...
Wanna convert Pod to a Template wiki format using the installed pod2wiki utility? Say less π
pod2wiki --style template file.pod > file.wiki
πΈ DESCRIPTION πΈ
So the vibe here: this module is the boiler plate, the example, the blueprint of how to create a new Pod::Simple::Wiki:: module. Peep the Portme section below for the whole story.
The Pod::Simple::Wiki::Template module is the one doing the converting β Pod text in, Wiki text out π
Pod (Plain Old Documentation) is that simple markup language everyone uses for writing Perl documentation. It's giving iconic, honestly.
For an introduction to Template see: <http://www.portme.org>.
And no, this module isn't generally invoked directly β it gets called via Pod::Simple::Wiki. Go read the Pod::Simple::Wiki and pod2wiki documentation for more info, iykyk.
π«Ά PORTME π«Ά
Once again for the people in the back: this module is used as a boiler plate or example of how to create a new Pod::Simple::Wiki:: module.
If you're thinking about creating a new Pod::Simple::Wiki:: module, you should use this module as a basis. It's literally built for that.
Portme. Any comments in the code or documentation that begin with or contain the word "portme" are intended for the porter β that's you, the person creating the new module. You should read all of the "portme" comments and eventually delete them when the module is finished.
π not me leaving "portme" comments in a finished moduleβ¦ couldn't be you, bestie
Here are some suggested steps for porting the module. For the sake of example, say we wish to convert Pod to a format called portmewiki. Also, for the sake of this example, we'll assume you know how to install and work on a module, or work on it in a local source tree using -I./lib or -Mblib.
π§ Portme Step 1
Fork, clone or download the latest version of Pod::Simple::Wiki from the github repository: <http://github.com/jmcnamara/pod-simple-wiki/>
Copy the /lib/Pod/Simple/Wiki/Template.pm to a new module /lib/Pod/Simple/Wiki/Portmewiki.pm.
The module name should have the first letter capitalised and all others lowercase, i.e. the same as returned by ucfirst().
π§ Portme Step 2
Edit the module and replace all instances of Template with Portmewiki (case sensitive).
Then replace all instances of template with portmewiki (case sensitive).
π§ Portme Step 3
The module should now work and can now be called as follows:
use Pod::Simple::Wiki;
my $parser = Pod::Simple::Wiki->new('portmewiki');
The default output format, in this configuration, is Kwiki.
π§ Portme Step 4
Write some tests. π yes, tests, bestie, we love her.
Copy the tests in the /t directory for one of the formats that is similar to the format that you are porting.
π§ Portme Step 5
Modify the source of Portmewiki.pm until all the tests pass and you are happy with the output format.
Start by modifying the tags and then move on to the other methods.
If you encounter problems, then you can turn on internal debugging:
my $parser = Pod::Simple::Wiki->new('portmewiki');
$parser->_debug(1);
Or for more debug information that you can deal with:
# At the start of your program and before anything else:
use Pod::Simple::Debug (5);
...
$parser->_debug(0);
If you find yourself with a difficult porting issue, then you may also wish to read Pod::Simple::Methody and Pod::Simple::Subclassing.
Try to maintain the code style of this module. See the source for more information.
π§ Portme Step 6
Remove or replace all portme comments. (Yes, all of them. Every single one. Be brave.)
π§ Portme Step 7
Send me a git pull request on Github with libs and tests and I'll release it to CPAN. π
π METHODS π
Pod::Simple::Wiki::Template inherits all of the methods of Pod::Simple and Pod::Simple::Wiki. See Pod::Simple and Pod::Simple::Wiki for more details.
π Template Specific information π
Portme: Add some information specific to the Template format or this module here. If required.
β¨ SEE ALSO β¨
This module also installs a pod2wiki command line utility. See pod2wiki --help for details.
π ACKNOWLEDGEMENTS π
Thanks to Portme McPortme and Portme O'Portme for patches, documentation or bugfixes. π«Ά absolute legends.
π DISCLAIMER OF WARRANTY π
Please refer to the DISCLAIMER OF WARRANTY in Pod::Simple::Wiki. (Genuinely, go read it, I'm not playing.)
π AUTHORS π
- John McNamara
jmcnamara@cpan.org - Portme McPortme
portme@portme.org
β 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.
and that's the whole page, bestie π This was Pod::S...emplate(3pm) from the User Contributed Perl Documentation, perl v5.36.0, dated 2022-10-13 β slay, go port a wiki module, periodt πΈπ¦
π¦ 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