fix Oracle
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSource.pm
index 171218b..6ac8538 100644 (file)
@@ -368,11 +368,10 @@ sub column_info {
     $self->{_columns_info_loaded}++;
     my $info = {};
     my $lc_info = {};
+
     # try for the case of storage without table
-    my $caught;
-    try { $info = $self->storage->columns_info_for( $self->from ) }
-    catch { $caught = 1 };
-    unless ($caught) {
+    try {
+      $info = $self->storage->columns_info_for( $self->from );
       for my $realcol ( keys %{$info} ) {
         $lc_info->{lc $realcol} = $info->{$realcol};
       }
@@ -382,7 +381,7 @@ sub column_info {
           %{ $info->{$col} || $lc_info->{lc $col} || {} }
         };
       }
-    }
+    };
   }
   return $self->_columns->{$column};
 }
@@ -1025,7 +1024,7 @@ sub add_relationship {
 
   return $self;
 
-  # XXX disabled. doesn't work properly currently. skip in tests.
+# XXX disabled. doesn't work properly currently. skip in tests.
 
   my $f_source = $self->schema->source($f_source_name);
   unless ($f_source) {
@@ -1041,10 +1040,11 @@ sub add_relationship {
   try { $self->_resolve_join($rel, 'me', {}, []) }
   catch {
     # If the resolve failed, back out and re-throw the error
-    delete $rels{$rel}; #
+    delete $rels{$rel};
     $self->_relationships(\%rels);
     $self->throw_exception("Error creating relationship $rel: $_");
   };
+
   1;
 }