
Class::DBI::GraphEasy - Graph Class::DBI classes automatically.

my $graph = Class::DBI::GraphEasy->new(
classes => ['Music::Artist','Music::CD'],
prettify => 1,
colorize => 1,
show_columns => 1,
no_recursion => 0,
); #returns a Graph::Easy object
print $graph->as_html_file(); #render $graph as html for rapid graphing
my $graphviz = $graph->as_graphviz(); #render as graphviz for best results

This module integrates Class::DBI and Graph::Easy. It is designed to automatically generate diagrams to illustrate the given Class::DBI classes. By default, it traverses both 'has a' and 'has many' relationships to discovery foreign classes recursively until not further relationships are found.

The public method is new().
It returns an Graph::Easy object or false when failed.
The following is a description of possible parameters.
This paramater is mandatory. It takes an arrayref of the Class::DBI classes (package names) that you would like to graph. The list is NOT restricted by namespaces.
Defaulted to 0. If set to 1, the module will prettify your class and attribute (column) labels, for example, showing "Wonderful Class" instead of "some::wonderful_class". Please note that the actual names of the class nodes are NOT changed. To prevent naming collisions, attributes node names are concatenated with their class name using a hyphen, i.e. "Class::Name-Attribute_Name". Please refer to the Graph::Easy Manual for controlling per node or per edge attributes.
Defaulted to 0. If set to 1, it will use a default color schema. The easiest way to change this is by modifying the values of the exported variables (requires 0.05+).
Defaulted to 0. It controls whether to graph the attributes (columns) of the given Class::DBI classes. The module automatically hides primary key columns and foreign key columns founded in 'has a' relationships.
Defaulted to 0. If set to 1, the module will NOT traverse relationships automatically to discovery foreign classes.
Defaulted to east. It is a shortcut to the flow directions of a graph suppported by Graph::Easy.
Defaulted to open. It is a shortcut to control the arrowstyles supported by Graph::Easy. It applies to all edges between classes. This option is handy since not all arrow styles are rendered nicely as html.
Defaulted to rect (rectangle). It is a shortcut to control the shape of all classes. Please refer to the Graph::Easy Manual for all possible shapes.
Defaulted to circle. It is a shortcut to control the shape of all attributes (columns). Please refer to the Graph::Easy Manual for all possible shapes.
This is an internal API to construct the graph.
This is an internal API to prettify class labels and attribute (column) labels.
This is an internal API for graphing attributes (columns).


Xufeng (Danny) Liang danny@scm.uws.edu.au

Copyright 2006 Xufeng (Danny) Liang, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.