NAME

Language::Homespring::Visulaise::GraphViz - A visual op-tree viewer for "Homespring"

SYNOPSIS

use Language::Homespring;
use Language::Homespring::Visualise::GraphViz;

my $code = "bear hatchery Hello,. World ..\n powers";

my $hs = new Language::Homespring();
$hs->parse($code);

my $vis = new Language::Homespring::Visualise::GraphViz({'interp' => $hs});
print $vis->do()->as_gif;

DESCRIPTION

This module implements a viewer for Homespring op-trees, using the GraphViz program. You can now see the rivers that your code produces :)

METHODS

new({'interp' => $hs})

Creates a new Language::Homespring::Visualise::GraphViz object. The single hash argument contains initialisation info. The only key currently supported (and required!) is 'interp', which should point to the Language::Homespring object you wish to visualise.

do()

Returns a GraphViz object, with all nodes and edges for the current state of the op-tree. You can then call standard GraphViz methods on this object such as as_gif() and as_png() to output an image.

AUTHOR

Copyright (C) 2003 Cal Henderson <cal@iamcal.com>

SEE ALSO

perl

Language::Homespring

http://www.graphviz.org/