X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FRelBuilder%2FCompat%2Fv0_040.pm;h=6bb08cbc7bf279a71450b96dd0f2f9e15238954a;hb=404aefa40641f06910962ac7cd69133298ee4598;hp=287bdbf59f18d40455a9f46970eb7b330e9bf3ef;hpb=900195eb6fc5ac5c15673b5eef751d513c6cd972;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm index 287bdbf..6bb08cb 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm @@ -19,7 +19,7 @@ sub _relnames_and_method { my $local_cols = $rel->{local_columns}; # for single-column case, set the remote relname to just the column name - my $remote_relname = + my ($remote_relname) = scalar keys %{$cond} == 1 ? $self->_inflect_singular( values %$cond ) : $self->_inflect_singular( lc $remote_table ); @@ -30,9 +30,9 @@ sub _relnames_and_method { if ($counters->{$remote_moniker} > 1) { my $colnames = '_' . join( '_', @$local_cols ); $remote_relname .= $colnames if keys %$cond > 1; - $local_relname = $self->_inflect_plural( lc($local_table) . $colnames ); + ($local_relname) = $self->_inflect_plural( lc($local_table) . $colnames ); } else { - $local_relname = $self->_inflect_plural(lc $local_table); + ($local_relname) = $self->_inflect_plural(lc $local_table); } return ( $local_relname, $remote_relname, 'has_many' );