Add sqlite roundtrip test (probably need to do the same for the rest of the parser...
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Schema / Graph.pm
index 097be2b..c3f61a7 100644 (file)
@@ -3,8 +3,10 @@ package SQL::Translator::Schema::Graph;
 use strict;
 
 use Data::Dumper;
-$Data::Dumper::Maxdepth = 3;
+local $Data::Dumper::Maxdepth = 3;
 
+use Log::Log4perl qw(:easy);
+Log::Log4perl->easy_init($ERROR) unless Log::Log4perl->initialized();
 use SQL::Translator::Schema::Graph::Node;
 use SQL::Translator::Schema::Graph::Edge;
 use SQL::Translator::Schema::Graph::Port;
@@ -20,14 +22,15 @@ use constant HyperEdge => 'SQL::Translator::Schema::Graph::HyperEdge';
 use Class::MakeMethods::Template::Hash (
   'new --and_then_init' => 'new',
   object => [
-                        'translator' => {class => 'SQL::Translator'},
-                       ],
+   'translator' => {class => 'SQL::Translator'},
+  ],
   'hash' => [ qw( node ) ],
   'number --counter' => [ qw( order ) ],
 );
 
 sub init {
   my $self = shift;
+
   #
   # build package objects
   #
@@ -80,7 +83,7 @@ sub init {
 
          $that->edgecount($node->name, $that->edgecount($node->name)+1);
 
-      #warn "\t" . $node->name . "\t" . $node->edgecount($that->name);
+          #warn "\t" . $node->name . "\t" . $node->edgecount($that->name);
          $node->push_edges( $edge );
          $that->push_edges( $edge->flip );
       }