1 package SQL::Translator::Producer::DiaUml;
7 SQL::Translator::Producer::DiaUml -
8 Produces dia UML diagrams from schema.
13 my $translator = SQL::Translator->new(
15 filename => 'foo_schema.sql',
18 print $translator->translate;
22 Currently you will get one class (with the a table
23 stereotype) generated per table in the schema. The fields are added as
24 attributes of the classes and their datatypes set. It doesn't currently set any
25 of the relationships. It doesn't do any layout, all the classses are in one big
26 stack. However it is still useful as you can use the layout tools in Dia to
27 automatically arrange them horizontally or vertically.
40 our ( $DEBUG, @EXPORT_OK );
41 our $VERSION = '1.59';
42 $DEBUG = 0 unless defined $DEBUG;
44 use File::ShareDir qw/dist_dir/;
46 use SQL::Translator::Utils 'debug';
47 use base qw/SQL::Translator::Producer::TT::Base/;
48 # Convert produce call into a method call on our class
49 sub produce { return __PACKAGE__->new( translator => shift )->run; };
52 ( INCLUDE_PATH => File::Spec->catdir (dist_dir('SQL-Translator'), 'DiaUml') );
55 sub tt_schema { 'schema.tt2' }
63 Mark Addison E<lt>grommit@users.sourceforge.netE<gt>.
67 * Add the foriegn keys from the schema as UML relations.