NAME
Pod::Simple::Wiki - A class for creating Pod to Wiki filters.
SYNOPSIS
To create a simple pod2wiki
filter:
#!/usr/bin/perl -w
use strict;
use Pod::Simple::Wiki;
my $parser = Pod::Simple::Wiki->new();
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__
DESCRIPTION
The Pod::Simple::Wiki
module is used for converting Pod text to Wiki text.
A Wiki is a user extensible web site. It uses very simple mark-up that is converted to Html.
For an introduction to Wikis see: http://c2.com/cgi/wiki?WikiGettingStartedFaq and http://c2.com/cgi/wiki?WikiWikiWebFaq
METHODS
new()
The new
method is used to create a new Pod::Simple::Wiki object. It is also used to set the output Wiki format.
my $parser1 = Pod::Simple::Wiki->new('wiki');
my $parser2 = Pod::Simple::Wiki->new('kwiki');
my $parser3 = Pod::Simple::Wiki->new(); # Defaults to 'wiki'
The currently supported formats are:
- wiki
-
This is the original Wiki format as used on Ward Cunningham's Portland repository of Patterns. The formatting rules are given at http://c2.com/cgi/wiki?TextFormattingRules
- kwiki
-
This is the format as used by Brian Ingerson's CGI::Kwiki: http://search.cpan.org/dist/CGI-Kwiki/
- usemod
-
This is the format used by the Usemod wikis. See: http://www.usemod.com/cgi-bin/wiki.pl?WikiFormat
If no format is specified the parser defaults to wiki
.
Any other parameters in new
will be passed on to the parent Pod::Simple object. See Pod::Simple for more details.
Other methods
Pod::Simple::Wiki inherits all of the methods of Pod::Simple. See Pod::Simple for more details.
TODO
A lot more work. This is a first release.
Add tests.
Add other Wiki formats such as TWiki and Wikipedia.
Add a robust
pod2wiki
utility.
ACKNOWLEDGEMENTS
Thanks to Sean M. Burke for Pod::Simple
. It may not be simple but sub-classing it is. :-)
AUTHOR
John McNamara jmcnamara@cpan.org
COPYRIGHT
© MMIII, 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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 604:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252