Attach a storage debugobj lazily instead of at new() time
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI.pm
index ed2ab1b..cd2da9e 100644 (file)
@@ -10,7 +10,6 @@ use mro 'c3';
 use Carp::Clan qw/^DBIx::Class|^Try::Tiny/;
 use DBI;
 use DBIx::Class::Storage::DBI::Cursor;
-use DBIx::Class::Storage::Statistics;
 use Scalar::Util qw/refaddr weaken reftype blessed/;
 use Data::Dumper::Concise 'Dumper';
 use Sub::Name 'subname';
@@ -171,9 +170,9 @@ sub new {
 
   sub _arm_global_destructor {
     my $self = shift;
-    my $key = Scalar::Util::refaddr ($self);
+    my $key = refaddr ($self);
     $seek_and_destroy{$key} = $self;
-    Scalar::Util::weaken ($seek_and_destroy{$key});
+    weaken ($seek_and_destroy{$key});
   }
 
   END {