From: Justin Hunter Date: Tue, 28 Apr 2009 20:20:42 +0000 (+0000) Subject: fix for columns => [ ... ] issue X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0bdff4e526f84bd5451fbe9531785ff2377e3fc8;p=dbsrgits%2FDBIx-Class-Historic.git fix for columns => [ ... ] issue --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index fcda9d5..7f53ec3 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -2404,12 +2404,20 @@ sub _resolved_attrs { # build columns (as long as select isn't set) into a set of as/select hashes unless ( $attrs->{select} ) { @colbits = map { - ( ref($_) eq 'HASH' ) ? $_ - : { - ( - /^\Q${alias}.\E(.+)$/ ? $1 - : $_ - ) => ( /\./ ? $_ : "${alias}.$_" ) + ( ref($_) eq 'HASH' ) + ? $_ + : { + ( + /^\Q${alias}.\E(.+)$/ + ? "$1" + : "$_" + ) + => + ( + /\./ + ? "$_" + : "${alias}.$_" + ) } } ( ref($attrs->{columns}) eq 'ARRAY' ) ? @{ delete $attrs->{columns}} : (delete $attrs->{columns} || $source->columns ); }