From: Dagfinn Ilmari Mannsåker Date: Fri, 20 Dec 2013 19:28:33 +0000 (+0000) Subject: Use hash slice assignment instead of loop X-Git-Tag: 0.07039~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a00a81fd4ce4a6aa9ebafd1c4683b681b6fdd095;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Use hash slice assignment instead of loop --- diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm index c463b77..50452b9 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm @@ -409,9 +409,7 @@ sub generate_code { } my %cond; - foreach my $i (0 .. $#$local_cols) { - $cond{$remote_cols->[$i]} = $local_cols->[$i]; - } + @cond{@$remote_cols} = @$local_cols; my ( $local_relname, $remote_relname, $remote_method ) = $self->_relnames_and_method( $local_moniker, $rel, \%cond, $uniqs, \%counters );