From: Peter Rabbitson Date: Fri, 30 Nov 2012 14:44:26 +0000 (+0100) Subject: Fix the leaktracer rewrite in 218b7c12 which broke under 5.10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cf8fa2867da29e20c8371827a98c6e49efa744e3;p=dbsrgits%2FDBIx-Class-Historic.git Fix the leaktracer rewrite in 218b7c12 which broke under 5.10 Reduce the amount of shuffling happening in CLONE - use a fresh hashref instead --- diff --git a/t/lib/DBICTest/Util/LeakTracer.pm b/t/lib/DBICTest/Util/LeakTracer.pm index 1720f8c..d0e63f2 100644 --- a/t/lib/DBICTest/Util/LeakTracer.pm +++ b/t/lib/DBICTest/Util/LeakTracer.pm @@ -53,9 +53,10 @@ sub CLONE { for my $reg (@individual_regs) { my @live_slots = grep { defined $reg->{$_}{weakref} } keys %$reg or next; + my @live_instances = @{$reg}{@live_slots}; - %$reg = (); + $reg = {}; # get a fresh hashref in the new thread ctx weaken( $reg_of_regs{refaddr($reg)} = $reg ); while (@live_slots) {