From: Ken Youens-Clark Date: Wed, 18 Jun 2003 23:14:00 +0000 (+0000) Subject: Fixed VERSION strings. X-Git-Tag: v0.04~404 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c33df5c4c9c2d5cd58e2a800cb15469292e46004;p=dbsrgits%2FSQL-Translator.git Fixed VERSION strings. --- diff --git a/lib/SQL/Translator/Schema/Constraint.pm b/lib/SQL/Translator/Schema/Constraint.pm index df1fdae..98fc027 100644 --- a/lib/SQL/Translator/Schema/Constraint.pm +++ b/lib/SQL/Translator/Schema/Constraint.pm @@ -1,7 +1,7 @@ package SQL::Translator::Schema::Constraint; # ---------------------------------------------------------------------- -# $Id: Constraint.pm,v 1.5 2003-06-06 22:35:16 kycl4rk Exp $ +# $Id: Constraint.pm,v 1.6 2003-06-18 23:14:00 kycl4rk Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark # @@ -51,7 +51,7 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'Class::Base'; use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); -$VERSION = 1.00; +$VERSION = (qw$Revision: 1.6 $)[-1]; my %VALID_CONSTRAINT_TYPE = ( PRIMARY_KEY, 1, diff --git a/lib/SQL/Translator/Schema/Field.pm b/lib/SQL/Translator/Schema/Field.pm index b40c92a..a298677 100644 --- a/lib/SQL/Translator/Schema/Field.pm +++ b/lib/SQL/Translator/Schema/Field.pm @@ -1,7 +1,7 @@ package SQL::Translator::Schema::Field; # ---------------------------------------------------------------------- -# $Id: Field.pm,v 1.9 2003-06-09 04:11:57 kycl4rk Exp $ +# $Id: Field.pm,v 1.10 2003-06-18 23:14:00 kycl4rk Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark # @@ -50,7 +50,7 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'Class::Base'; use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); -$VERSION = 1.00; +$VERSION = (qw$Revision: 1.10 $)[-1]; # ---------------------------------------------------------------------- sub init { @@ -102,12 +102,17 @@ all the comments joined on newlines. for my $arg ( @_ ) { $arg = $arg->[0] if ref $arg; - push @{ $self->{'comments'} }, $arg; + push @{ $self->{'comments'} }, $arg if $arg; } - return wantarray - ? @{ $self->{'comments'} || [] } - : join( "\n", @{ $self->{'comments'} || [] } ); + if ( @{ $self->{'comments'} || [] } ) { + return wantarray + ? @{ $self->{'comments'} || [] } + : join( "\n", @{ $self->{'comments'} || [] } ); + } + else { + return wantarray ? () : ''; + } } diff --git a/lib/SQL/Translator/Schema/Index.pm b/lib/SQL/Translator/Schema/Index.pm index c41680f..a70882a 100644 --- a/lib/SQL/Translator/Schema/Index.pm +++ b/lib/SQL/Translator/Schema/Index.pm @@ -1,7 +1,7 @@ package SQL::Translator::Schema::Index; # ---------------------------------------------------------------------- -# $Id: Index.pm,v 1.5 2003-06-06 22:34:46 kycl4rk Exp $ +# $Id: Index.pm,v 1.6 2003-06-18 23:14:00 kycl4rk Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark # @@ -53,7 +53,7 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'Class::Base'; use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); -$VERSION = 1.00; +$VERSION = (qw$Revision: 1.6 $)[-1]; my %VALID_INDEX_TYPE = ( UNIQUE, 1, diff --git a/lib/SQL/Translator/Schema/Table.pm b/lib/SQL/Translator/Schema/Table.pm index ae7f34e..d1f6d40 100644 --- a/lib/SQL/Translator/Schema/Table.pm +++ b/lib/SQL/Translator/Schema/Table.pm @@ -1,7 +1,7 @@ package SQL::Translator::Schema::Table; # ---------------------------------------------------------------------- -# $Id: Table.pm,v 1.8 2003-06-09 02:10:10 kycl4rk Exp $ +# $Id: Table.pm,v 1.9 2003-06-18 23:14:00 kycl4rk Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark # @@ -50,7 +50,7 @@ use SQL::Translator::Schema::Index; use base 'Class::Base'; use vars qw( $VERSION $FIELD_ORDER ); -$VERSION = 1.00; +$VERSION = (qw$Revision: 1.9 $)[-1]; # ---------------------------------------------------------------------- sub init { diff --git a/lib/SQL/Translator/Schema/View.pm b/lib/SQL/Translator/Schema/View.pm index c41f5f0..8a6c4ab 100644 --- a/lib/SQL/Translator/Schema/View.pm +++ b/lib/SQL/Translator/Schema/View.pm @@ -1,7 +1,7 @@ package SQL::Translator::Schema::View; # ---------------------------------------------------------------------- -# $Id: View.pm,v 1.2 2003-05-09 17:12:15 kycl4rk Exp $ +# $Id: View.pm,v 1.3 2003-06-18 23:14:00 kycl4rk Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark # @@ -49,7 +49,7 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'Class::Base'; use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); -$VERSION = 1.00; +$VERSION = (qw$Revision: 1.3 $)[-1]; # ---------------------------------------------------------------------- sub init {