X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSet.pm;h=a2a461b95304722c8fd702b927fa8404f1ba438f;hb=76031e147d6f0d80ab3ec73a12d373962ade1252;hp=a2f95f11b81991017f83ede991ba65a1d7cddea1;hpb=908aa1bb761ec1da5c061fe9f687598e3f1934bc;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index a2f95f1..a2a461b 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1281,10 +1281,10 @@ sub _construct_objects { # construct a much simpler array->hash folder for the one-table cases right here if ($attrs->{_single_object_inflation} and ! $attrs->{collapse}) { - # FIXME this is a very very very hot spot + # FIXME SUBOPTIMAL this is a very very very hot spot # while rather optimal we can *still* do much better, by # building a smarter [Row|HRI]::inflate_result(), and - # switch to feeding it data via some leaner interface + # switch to feeding it data via a much leaner interface # my $infmap = $attrs->{as}; my @as_idx = 0..$#$infmap; @@ -1292,7 +1292,7 @@ sub _construct_objects { $r = [{ map { $infmap->[$_] => $r->[$_] } @as_idx }] } - # FIXME - this seems to be faster than the hashmapper aove, especially + # FIXME - this seems to be faster than the hashmapper above, especially # on more rows, but need a better bench-environment to confirm #eval sprintf ( # '$_ = [{ %s }] for @$rows', @@ -1302,12 +1302,14 @@ sub _construct_objects { else { push @$rows, @{$self->{stashed_rows}||[]}; - $rsrc->_mk_row_parser({ + my $perl = $rsrc->_mk_row_parser({ inflate_map => $attrs->{as}, selection => $attrs->{select}, collapse => $attrs->{collapse}, unordered => $unordered, - })->( + }); + + (eval "sub { no warnings; no strict; $perl }")->( # disable of strictures seems to have some effect, weird $rows, # modify in-place, shrinking/extending as necessary ($attrs->{collapse} and ! $fetch_all and ! $unordered) ? (