From: Chris Hilton Date: Tue, 28 Jun 2005 22:56:22 +0000 (+0000) Subject: Modified equals() to get scalar references to fields for comparison X-Git-Tag: v0.11008~514 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=711e98e05d847d52ff915cdacd43693035411ac3;p=dbsrgits%2FSQL-Translator.git Modified equals() to get scalar references to fields for comparison --- diff --git a/lib/SQL/Translator/Schema/Index.pm b/lib/SQL/Translator/Schema/Index.pm index 1464bba..9d08db8 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.11 2005-06-27 21:59:19 duality72 Exp $ +# $Id: Index.pm,v 1.12 2005-06-28 22:56:22 duality72 Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -53,7 +53,7 @@ use base 'SQL::Translator::Schema::Object'; use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); -$VERSION = sprintf "%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/; my %VALID_INDEX_TYPE = ( UNIQUE, 1, @@ -254,7 +254,7 @@ Determines if this index is the same as another # return 0 unless $case_insensitive ? uc($self->name) eq uc($other->name) : $self->name eq $other->name; return 0 unless $self->is_valid eq $other->is_valid; return 0 unless $self->type eq $other->type; - return 0 unless $self->_compare_objects($self->fields, $other->fields); + return 0 unless $self->_compare_objects(scalar $self->fields, scalar $other->fields); return 0 unless $self->_compare_objects($self->options, $other->options); return 0 unless $self->_compare_objects($self->extra, $other->extra); return 1;