X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator.pm;h=0a0808ae1b71494496707f9039227bccb3a04824;hb=478f608d9028508396da37bb5df10b3057b96981;hp=b8ce77ba2add5611305ee48faf45f254fad9cd66;hpb=2aa47c7d96e2c3e9722035cc2c76bcadea34052e;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator.pm b/lib/SQL/Translator.pm index b8ce77b..0a0808a 100644 --- a/lib/SQL/Translator.pm +++ b/lib/SQL/Translator.pm @@ -1,9 +1,9 @@ package SQL::Translator; # ---------------------------------------------------------------------- -# $Id: Translator.pm,v 1.70 2006-11-09 18:23:01 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.08_03'; -$REVISION = sprintf "%d.%02d", q$Revision: 1.70 $ =~ /(\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 +=item * Anders Nor Berle + =item * Dave Cash =item * Darren Chamberlain @@ -1297,6 +1304,12 @@ The following people have contributed to the SQLFairy project: =item * Ying Zhang +=item * Daniel Ruoso + +=item * Ryan D Johnson + +=item * Jonathan Yu + =back If you would like to contribute to the project, you can send patches