From: Dagfinn Ilmari Mannsåker Date: Mon, 7 Oct 2013 14:52:42 +0000 (+0100) Subject: Fix confusingly erroneous variable name X-Git-Tag: v0.11019~42 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c673d2032077bce493095287d4e745d5dd6f470;p=dbsrgits%2FSQL-Translator.git Fix confusingly erroneous variable name --- diff --git a/lib/SQL/Translator/Schema/Constraint.pm b/lib/SQL/Translator/Schema/Constraint.pm index 79c1e73..d5227b5 100644 --- a/lib/SQL/Translator/Schema/Constraint.pm +++ b/lib/SQL/Translator/Schema/Constraint.pm @@ -196,9 +196,9 @@ Returns undef or an empty list if the constraint has no fields set. sub fields { my $self = shift; my $table = $self->table; - my @tables = map { $table->get_field($_) || $_ } @{$self->field_names(@_) || []}; - return wantarray ? @tables - : @tables ? \@tables + my @fields = map { $table->get_field($_) || $_ } @{$self->field_names(@_) || []}; + return wantarray ? @fields + : @fields ? \@fields : undef; }