Bumping version to 1.62
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / Diagram.pm
index 08b6dd3..4dfa995 100644 (file)
@@ -12,7 +12,7 @@ Use via SQL::Translator:
 
   my $t = SQL::Translator->new(
       from          => 'MySQL',
-      to            => 'GraphViz',
+      to            => 'Diagram',
       producer_args => {
           # All args are optional
           out_file         => 'schema.png',# if not provided will return from translate()
@@ -47,7 +47,7 @@ use SQL::Translator::Schema::Constants;
 use SQL::Translator::Utils qw(debug);
 
 our $DEBUG;
-our $VERSION = '1.59';
+our $VERSION = '1.62';
 $DEBUG   = 0 unless defined $DEBUG;
 
 use constant VALID_FONT_SIZE => {
@@ -67,8 +67,8 @@ sub produce {
     my $schema     = $t->schema;
     my $args       = $t->producer_args;
     local $DEBUG   = $t->debug;
-    debug("Schema =\n", Dumper( $schema ));
-    debug("Producer args =\n", Dumper( $args ));
+    debug("Schema =\n", Dumper( $schema )) if $DEBUG;
+    debug("Producer args =\n", Dumper( $args )) if $DEBUG;
 
     my $out_file     = $args->{'out_file'}     || '';
     my $output_type  = $args->{'output_type'}  || 'png';
@@ -176,7 +176,7 @@ sub produce {
         debug("Processing table '$table_name'");
 
         my @fields = $table->get_fields;
-        debug("Fields = ", join(', ', map { $_->name } @fields));
+        debug("Fields = ", join(', ', map { $_->name } @fields)) if $DEBUG;
 
         my ( @fld_desc, $max_name, $max_desc );
         for my $f ( @fields ) {