Use a single cache struct for entirety of describe_class_methods
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI.pm
index adcd6b4..6c2940c 100644 (file)
@@ -9,7 +9,6 @@ use mro 'c3';
 
 use DBIx::Class::Carp;
 use Scalar::Util qw/refaddr weaken reftype blessed/;
-use List::Util qw/first/;
 use Context::Preserve 'preserve_context';
 use Try::Tiny;
 use SQL::Abstract qw(is_plain_value is_literal_value);
@@ -252,7 +251,7 @@ sub new {
     undef;
   }
 
-  sub CLONE {
+  sub DBIx::Class::__DBI_Storage_iThreads_handler__::CLONE {
     # As per DBI's recommendation, DBIC disconnects all handles as
     # soon as possible (DBIC will reconnect only on demand from within
     # the thread)
@@ -1743,7 +1742,7 @@ sub _gen_sql_bind {
       and
     $op eq 'select'
       and
-    first {
+    grep {
       length ref $_->[1]
         and
       blessed($_->[1])
@@ -1813,7 +1812,7 @@ sub _format_for_trace {
 
   map {
     defined( $_ && $_->[1] )
-      ? qq{'$_->[1]'}
+      ? sprintf( "'%s'", "$_->[1]" )  # because overload
       : q{NULL}
   } @{$_[1] || []};
 }