NAME
DBIx::Class::Visualizer - Visualize a DBIx::Class schema
VERSION
Version 0.0100, released 2016-09-04.
SYNOPSIS
use DBIx::Class::Visualizer;
use A::DBIx::Class::Schema;
my $schema = A::DBIx::Class::Schema->connect;
my $svg = DBIx::Class::Visualizer->new->svg;
DESCRIPTION
DBIx::Class::Visualizer is a GraphViz2 renderer for DBIx::Class schemata.
On the relatively small schemata (about twenty result classes) that I have tried it on it produces reasonably readable graphs. See example/visualized.svg
for a simple example (also available on Github).
ATTRIBUTES
schema
Required instance of a DBIx::Class::Schema.
graphviz_config
Optional hashref. This hashref is passed to the GraphViz2 constructor. Set this if the defaults don't work. Setting this will replace the defaults.
graph
Can't be passed in the constructor. This contains the constructed GraphViz2 object. Use this if you wish to render the visualization manually:
my $png = DBIx::Class::Visualizer->new(schema => $schema)->graph->run(output_file => 'myschema.png', format => 'png');
METHODS
new
The constructor.
svg
Takes no arguments, and returns the rendered svg document as a string.
SEE ALSO
Mojolicious::Plugin::DbicSchemaViewer - A Mojolicious plugin that uses this class
GraphViz2::DBI - A similar idea
SOURCE
https://github.com/Csson/p5-DBIx-Class-Visualizer
HOMEPAGE
https://metacpan.org/release/DBIx-Class-Visualizer
AUTHOR
Erik Carlsson <info@code301.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by Erik Carlsson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.