From: Peter Rabbitson Date: Sat, 13 Jun 2009 16:08:14 +0000 (+0000) Subject: local()ize sqla for in the right place X-Git-Tag: v0.08107~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4913997492ff5a1db89762fc4713512e0ffc142e;p=dbsrgits%2FDBIx-Class.git local()ize sqla for in the right place --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 05ae3db..0b4c4b7 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1192,7 +1192,6 @@ sub _per_row_update_delete { sub _select { my $self = shift; my $sql_maker = $self->sql_maker; - local $sql_maker->{for}; return $self->_execute($self->_select_args(@_)); } @@ -1215,7 +1214,8 @@ sub _select_args { my $for = delete $attrs->{for}; my $sql_maker = $self->sql_maker; - $sql_maker->{for} = $for; + + local $sql_maker->{for} = $for; my $order = { map { $attrs->{$_} ? ( $_ => $attrs->{$_} ) : () }