Switched storage from prepare to prepare_cached with an if_active of 3, as recommende...
Matt S Trout [Wed, 18 Jan 2006 01:07:51 +0000 (01:07 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index d54b1c1..67c04a5 100644 (file)
@@ -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;