Made change suggested by Daniel Böhringer to allow "ID" integer DEFAULT nextval(...
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator.pm
index 890b3ca..4e34d0a 100644 (file)
@@ -536,8 +536,13 @@ sub translate {
     # Run producer
     # Calling wantarray in the eval no work, wrong scope.
     my $wantarray = wantarray ? 1 : 0;
-    eval { $wantarray ? @producer_output = $producer->($self) :
-               $producer_output = $producer->($self) };
+    eval {
+        if ($wantarray) {
+            @producer_output = $producer->($self);
+        } else {
+            $producer_output = $producer->($self);
+        }
+    };
     if ($@ || !( $producer_output || @producer_output)) {
         my $err = $@ || $self->error || "no results";
         my $msg = "translate: Error with producer '$producer_type': $err";