X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FProducer%2FGraphViz.pm;h=3b8ef59d37d2aae99b16cc81ddac31a50f64f00a;hb=1f742579d2d66e83f3f36c22e60acb5f4930e025;hp=aafe6f424624f92987c9d4839d8c676030423f30;hpb=ea93df61568d8fa52a9764a09c4351928ff9374d;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Producer/GraphViz.pm b/lib/SQL/Translator/Producer/GraphViz.pm index aafe6f4..3b8ef59 100644 --- a/lib/SQL/Translator/Producer/GraphViz.pm +++ b/lib/SQL/Translator/Producer/GraphViz.pm @@ -1,23 +1,5 @@ package SQL::Translator::Producer::GraphViz; -# ------------------------------------------------------------------- -# Copyright (C) 2002-2009 SQLFairy Authors -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; version 2. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA -# ------------------------------------------------------------------- - =pod =head1 NAME @@ -114,7 +96,7 @@ undefined (the default) - the result is returned as a string. =item * output_type (DEFAULT: 'png') This determines which -L +L will be invoked to generate the graph: C translates to C, C to C and so on. @@ -131,7 +113,7 @@ constraints) =item * show_fields (DEFAULT: true) -If set to a true value, the names of the colums in a table will +If set to a true value, the names of the columns in a table will be displayed in each table's node =item * show_fk_only @@ -247,8 +229,8 @@ use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(debug); use Scalar::Util qw/openhandle/; -use vars qw[ $VERSION $DEBUG ]; -$VERSION = '1.59'; +our $DEBUG; +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; sub produce { @@ -538,7 +520,7 @@ sub produce { debug("Processing table '$table_name'"); - debug("Fields = ", join(', ', map { $_->name } @fields)); + debug("Fields = ", join(', ', map { $_->name } @fields)) if $DEBUG; for my $f ( @fields ) { my $name = $f->name or next; @@ -641,8 +623,6 @@ sub produce { 1; -# ------------------------------------------------------------------- - =pod =head1 AUTHOR