X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FSchema.pm;h=cea46adbe118c77e95b1bfdd3b77c3a82eee5d82;hb=877797995df7f3d1cd1f9b730da36c7fda011c9f;hp=22d6525d611bd6681ece38bb108f154ed10a27f3;hpb=daf24e05dd6b0a369a4510d61d7c1f81059a50fb;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Schema.pm b/lib/SQL/Translator/Schema.pm index 22d6525..cea46ad 100644 --- a/lib/SQL/Translator/Schema.pm +++ b/lib/SQL/Translator/Schema.pm @@ -1,9 +1,9 @@ package SQL::Translator::Schema; # ---------------------------------------------------------------------- -# $Id: Schema.pm,v 1.10 2003-10-08 17:35:18 kycl4rk Exp $ +# $Id: Schema.pm,v 1.14 2004-03-23 21:12:22 grommit Exp $ # ---------------------------------------------------------------------- -# Copyright (C) 2003 Ken Y. Clark +# Copyright (C) 2002-4 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 @@ -54,7 +54,7 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'Class::Base'; use vars qw[ $VERSION $TABLE_ORDER $VIEW_ORDER $TRIGGER_ORDER $PROC_ORDER ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.10 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/; # ---------------------------------------------------------------------- sub init { @@ -111,7 +111,8 @@ not be created. } $table->order( ++$TABLE_ORDER ); - my $table_name = $table->name or return $self->error('No table name'); + # We know we have a name as the Table->new above errors if none given. + my $table_name = $table->name; if ( defined $self->{'tables'}{ $table_name } ) { return $self->error(qq[Can't create table: "$table_name" exists]);