Bumping version to 1.62
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / DiaUml.pm
CommitLineData
35a1938f 1package SQL::Translator::Producer::DiaUml;
2
35a1938f 3=pod
4
5=head1 NAME
6
7SQL::Translator::Producer::DiaUml -
8 Produces dia UML diagrams from schema.
9
10=head1 SYNOPSIS
11
12 use SQL::Translator;
13 my $translator = SQL::Translator->new(
14 from => 'MySQL',
15 filename => 'foo_schema.sql',
16 to => 'DiaUml',
17 );
18 print $translator->translate;
19
20=head1 DESCRIPTION
21
22Currently you will get one class (with the a table
23stereotype) generated per table in the schema. The fields are added as
24attributes of the classes and their datatypes set. It doesn't currently set any
a0ee29e3 25of the relationships. It doesn't do any layout, all the classes are in one big
35a1938f 26stack. However it is still useful as you can use the layout tools in Dia to
27automatically arrange them horizontally or vertically.
28
29=head2 Producer Args
30
35a1938f 31=cut
32
35a1938f 33use strict;
f27f9229 34use warnings;
35a1938f 35
0c04c5a2 36our ( $DEBUG, @EXPORT_OK );
f769b7e8 37our $VERSION = '1.62';
35a1938f 38$DEBUG = 0 unless defined $DEBUG;
39
6e64adbe 40use File::ShareDir qw/dist_dir/;
41
35a1938f 42use SQL::Translator::Utils 'debug';
35a1938f 43use base qw/SQL::Translator::Producer::TT::Base/;
44# Convert produce call into a method call on our class
45sub produce { return __PACKAGE__->new( translator => shift )->run; };
46
35a1938f 47sub tt_config {
6e64adbe 48 ( INCLUDE_PATH => File::Spec->catdir (dist_dir('SQL-Translator'), 'DiaUml') );
35a1938f 49}
50
51sub tt_schema { 'schema.tt2' }
52
531;
54
35a1938f 55=pod
56
57=head1 AUTHOR
58
59Mark Addison E<lt>grommit@users.sourceforge.netE<gt>.
60
61=head1 TODO
62
a0ee29e3 63* Add the foreign keys from the schema as UML relations.
35a1938f 64
65* Layout the classes.
66
67=head1 SEE ALSO
68
69SQL::Translator.
70
71=cut