NAME
Graph::Easy::Pod2HTML - Render pod with graph code as HTML
SYNOPSIS
perl -MGraph::Easy::Pod2HTML=go -e 'go thingy.pod'
DESCRIPTION
Graph::Easy::Pod2HTML
uses Pod::Simple::HTML to render POD as HTML. In addition to Pod::Simple::HTML, it also handles paragraphs of the type graph
like shown here:
=for graph [ A ] => [ B ]
=begin graph
[ A ] => [ B ] -> [ C ]
[ C ] => [ D ]
=end graph
In addition to graph
code, you can also use graph-common
to store graph code that should be common to all following graphs. Each graph-common
paragraph will replace the former definition:
This graph will have default settings:
=for graph [ A ] => [ B ]
Store now a different background color:
=begin graph-common
graph { background: #deadff; }
node { background: #fff000; }
=end graph-common
This graph will use the common part defined above:
=for graph [ A ] => [ B ]
This will replace the common parts with only a
blue background for nodes:
=for graph-common node { background: blue; }
So this graph will have blue nodes:
=for graph [ A ] => [ B ]
More info about the graph code can be found at http://bloodgate.com/perl/graph/.
METHODS
new()
$converter = Graph::Easy::Pod2HTML->new();
Creates a new converter object, which takes pod and emit's HTML.
go()
$conveter->go( $filename );
Parse $filename
and emit HTML on STDOUT.
CUSTOMIZATION
The following methods can be used to customize the appearance and the contents of the output of Graph::Easy::Pod2HTML
:
footer_contents
$footer = $converter->footer_contents(); # query
$converter->footer_contents(''); # disable
$converter->footer_contents('Hello HTML!'); # set
This method let's you decide whether you want a final footer paragraph, or not, and what it should contain. The default is a timestamp and the version of Graph::Easy::Pod2HTML.
css_file
$converter->css_file(''); # none
$converter->css_file('base.css'); # base.css
This method can be used to set the name of an external stylesheet file that should be linked from the generated document.
EXPORT
Exports nothing, but can export go()
on request.
SEE ALSO
More info about the graph code can be found at http://bloodgate.com/perl/graph/.
AUTHOR
Copyright (C) 2005 by Tels http://bloodgate.com
See the LICENSE file for information.