Mediawiki::POD::HTML - a subclass to catch X keywords and =head lines
use Mediawiki::POD::HTML; my $parser = Mediawiki::POD::HTML->new(); my $html = $parser->parse_string_document($POD);
Turns a given POD (Plain Old Documentation) into HTML code.
This subclass of Pod::Simple::HTML catches =head directives, and then allows you to assemble a TOC (table of contents) from the captured headlines.
=head
In addition, it supports graph-common and graph subsections, these will be turned into HTML graphs.
graph-common
graph
Mediawiki::POD::HTML allows you to write graphs (nodes connected with edges) in Graph::Easy or http://www.graphviz.org|Graphviz format and turns these portions into HTML "graphics".
The following represents two graphs:
=for graph [ Single ] --> [ Line ] --> [ Definition ] =begin graph node { fill: silver; } [ Mutli ] --> [ Line ] =end graph
In addition, a graph-common section can be used to set a common text for all following graphs. Each graph-common section resets the common text section:
=for graph-common node { fill: red; } =for graph [ Red ] =for graph [ Red too ] =for graph-common node { fill: blue; } =for graph [ Blue ] =for graph [ Blue too ]
The attribute output for graphs is not yet used, eventually it should result in different output formats like SVG, or PNG rendered via dot.
output
Return all the captured headlines as an ARRAY ref.
# Set external search engine to search for "Foo+Bar" $parser->keyword_search_url('http://search.cpan.org/perldoc?'); # Generate URLs like "Foo_Bar", perfect for relative wiki links: $parser->keyword_search_url('', '_');
Get/set the URL that is used to link keywords defined with X<> to a search engine.
X<>
If the URL contains a text ##KEYWORD##, then this text will be replaced with the actual keyword. Otherwise, the keyword is simple appended to the URL.
##KEYWORD##
The default search URL is:
http://cpan.uwinnipeg.ca/search?query=##KEYWORD##
Optionally set the character that replaces a space in generated URLs. The default space replacement character is undef, this means the character is dependend on the search URL:
For URLS with ##KEYWORD##, it is '+'
For URLS without a ##KEYWORD##, it is '_'
This library is free software; you can redistribute it and/or modify it under the same terms of the GPL.
See the LICENSE file for information.
(c) Copyright by Tels http://bloodgate.com/wiki 2007
http://bloodgate.com/wiki/POD, Graph::Easy.
To install Mediawiki::POD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mediawiki::POD
CPAN shell
perl -MCPAN -e shell install Mediawiki::POD
For more information on module installation, please visit the detailed CPAN module installation guide.