- Removed use of $Revision$ SVN keyword to generate VERSION variables; now sub-module...
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator.pm
index 88df169..0a0808a 100644 (file)
@@ -1,9 +1,9 @@
 package SQL::Translator;
 
 # ----------------------------------------------------------------------
-# $Id: Translator.pm,v 1.72 2007-09-26 13:20:09 schiffbruechige Exp $
+# $Id$
 # ----------------------------------------------------------------------
-# Copyright (C) 2002-4 The SQLFairy Authors
+# Copyright (C) 2002-2009 The 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
@@ -21,13 +21,12 @@ package SQL::Translator;
 # -------------------------------------------------------------------
 
 use strict;
-use vars qw( $VERSION $REVISION $DEFAULT_SUB $DEBUG $ERROR );
+use vars qw( $VERSION $DEFAULT_SUB $DEBUG $ERROR );
 use base 'Class::Base';
 
 require 5.004;
 
-$VERSION  = '0.08001';
-$REVISION = sprintf "%d.%02d", q$Revision: 1.72 $ =~ /(\d+)\.(\d+)/;
+$VERSION  = '0.09002';
 $DEBUG    = 0 unless defined $DEBUG;
 $ERROR    = "";
 
@@ -39,6 +38,7 @@ use File::Find;
 use File::Spec::Functions qw(catfile);
 use File::Basename qw(dirname);
 use IO::Dir;
+use SQL::Translator::Producer;
 use SQL::Translator::Schema;
 
 # ----------------------------------------------------------------------
@@ -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";
@@ -1273,6 +1278,8 @@ The following people have contributed to the SQLFairy project:
 
 =item * Sam Angiuoli <angiuoli@users.sourceforge.net>
 
+=item * Anders Nor Berle <berle@cpan.org>
+
 =item * Dave Cash <dave@gnofn.org>
 
 =item * Darren Chamberlain <dlc@users.sourceforge.net>
@@ -1297,6 +1304,12 @@ The following people have contributed to the SQLFairy project:
 
 =item * Ying Zhang <zyolive@yahoo.com>
 
+=item * Daniel Ruoso <daniel@ruoso.com>
+
+=item * Ryan D Johnson <ryan@innerfence.com>
+
+=item * Jonathan Yu <frequency@cpan.org>
+
 =back
 
 If you would like to contribute to the project, you can send patches