Graph::Easy::Marpa::Renderer::GraphViz2 - This is the default rendering engine for Graph::Easy::Marpa
See "Synopsis" in Graph::Easy::Marpa.
This module is the default rendering engine for Graph::Easy::Marpa.
It provides a GraphViz2-based renderer for Graph::Easy::Marpa-style graph definitions.
For more details, see "Description" in Graph::Easy::Marpa.
Install Graph::Easy::Marpa as you would for any Perl module:
Perl
Run:
cpanm Graph::Easy::Marpa
or run:
sudo cpan Graph::Easy::Marpa
or unpack the distro, and then either:
perl Build.PL ./Build ./Build test sudo ./Build install
or:
perl Makefile.PL make (or dmake or nmake) make test make install
new() is called as my($parser) = Graph::Easy::Marpa::Renderer::GraphViz2 -> new(k1 => v1, k2 => v2, ...).
new()
my($parser) = Graph::Easy::Marpa::Renderer::GraphViz2 -> new(k1 => v1, k2 => v2, ...)
It returns a new object of type Graph::Easy::Marpa::Renderer::GraphViz2.
Graph::Easy::Marpa::Renderer::GraphViz2
Key-value pairs accepted in the parameter list (see corresponding methods for details [e.g. maxlevel()]):
Specify the name of a file that the rendering engine can write to, which will contain the input to dot (or whatever). This is good for debugging.
Default: ''.
If '', the file will not be created.
This is the format of the output file.
The default is 'svg'.
You can also pass this value into "run(%arg)".
The value passed in to run() takes precedence over the value passed in to new().
Specify a logger object.
To disable logging, just set logger to the empty string.
The default value is an object of type Log::Handler.
This option is only used if Graph::Easy::Marpa::Parser creates an object of type Log::Handler.
See Log::Handler::Levels.
The default 'maxlevel' is 'info'. A typical choice is 'debug'.
The default 'minlevel' is 'error'.
No lower levels are used.
Specify the name of the output file to write.
The default value is ''.
$direction must be one of: LR or RL or TB or BT.
Specify the rankdir of the graph as a whole.
The value for rankdir is passed to Graph::Easy::Marpa::Renderer::GraphViz2.
Default: 'TB'.
Here, the [] indicate an optional parameter.
Get or set the name of the file into which the rendering engine will write to input to dot (or whatever).
You can pass 'dot_input_file' as a key into new() and run().
Get or set the format of the output file.
You can pass 'format' as a key into new() and run().
Get or set the logger object.
You can pass 'logger' as a key into new() and run().
Get or set the value used by the logger object.
Get or set the name of the output file.
The default is ''.
You can pass 'output_file' as a key into new() and run().
Get or set the rankdir of the graph as a whole.
The default is 'TB' (top to bottom).
Renders a set of items as an image, using GraphViz2.
Keys and values in %arg are:
The format (e.g. 'svg') to pass to the rendering engine.
This arrayref, passed from Graph::Easy::Marpa::Parser is the result of parsing the Graph::Easy-style graph definition (data/*.ge) file.
Each element of this arrayref is a hashref with these key-value pairs:
This is where the output of 'dot' will be written.
GraphViz2 -> new ( edge => $class{edge} || {color => 'grey'}, global => $class{global} || {directed => 1}, graph => $class{graph} || {rankdir => $self -> rankdir}, logger => $self -> logger, node => $class{node} || {shape => 'oval'}, verbose => 0, )
where $class($name) etc are taken from the class declarations, if any, at the start of the input stream.
The file Changes was converted into Changelog.ini by Module::Metadata::Changes.
Version numbers < 1.00 represent development versions. From 1.00 up, they are production versions.
Email the author, or log a bug on RT:
https://rt.cpan.org/Public/Dist/Display.html?Name=Graph::Easy::Marpa.
Graph::Easy::Marpa was written by Ron Savage <ron@savage.net.au> in 2011.
Home page: http://savage.net.au/index.html.
Australian copyright (c) 2011, Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html
To install Graph::Easy::Marpa, copy and paste the appropriate command in to your terminal.
cpanm
CPAN shell
perl -MCPAN -e shell install Graph::Easy::Marpa
For more information on module installation, please visit the detailed CPAN module installation guide.