Graph::Flowchart is a Perl module that can generate easily flowcharts as Graph::Easy objects.
my $flow = Graph::Flowchart->new();
This module lets you easily create flowcharts as Graph::Easy objects. This means you can output your flowchart as HTML, ASCII, Boxart (unicode drawing) or SVG.
The nodes constructed by the various add_* methods will set the subclass of the node according to the following list:
The start block.
The end block, created by finish().
Orindary code blocks, f.i. from $b = 9;.
if, for, while, until
Blocks for the various constructs for conditional and loop constructs.
For sub routine declarations.
For use, no and require statements.
goto, break, return, next, last, continue
Blocks for the various constructs for jumps/returns.
true, false, goto, call, return, break, next, continue
Classes for edges of the true and false if-branches, and for goto, as well as sub routine calls.
Each class will get some default attributes, like if constructs having a diamond-shape.
You can override the graph appearance most easily by changing the (sub)-class attributes:
my $chart = Graph::Flowchart->new();
$chart->add_block('$a = 9;');
$chart->add_if_then('$a == 9;', '$b = 1;');
my $graph = $chart->as_graph();
Now $graph is a Graph::Easy object and you can manipulate the class attributes like so:
$graph->set_attribute('node.if', 'fill', 'red');
$graph->set_attribute('edge.true', 'color', 'green');
This will color all conditional blocks red, and edges that represent the true branch green.