From: Matt S Trout Date: Wed, 18 Jan 2006 01:07:51 +0000 (+0000) Subject: Switched storage from prepare to prepare_cached with an if_active of 3, as recommende... X-Git-Tag: v0.05005~117^2~42 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=91fa659e479fec2f148dad9084b14017915cc553;p=dbsrgits%2FDBIx-Class.git Switched storage from prepare to prepare_cached with an if_active of 3, as recommended by Tim Bunce --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index d54b1c1..67c04a5 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -292,8 +292,8 @@ sub select_single { sub sth { my ($self, $sql, $op) = @_; - my $meth = (defined $op && $op ne 'select' ? 'prepare_cached' : 'prepare'); - return $self->dbh->$meth($sql); + # 3 is the if_active parameter which avoids active sth re-use + return $self->dbh->prepare_cached($sql, {}, 3); } 1;