Add a weaken() cycle forgotten in d63c9e64
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / _Util.pm
index 4ff698d..6f6ac46 100644 (file)
@@ -366,6 +366,9 @@ sub is_exception ($) {
       values %$destruction_registry
     };
 
+    weaken( $destruction_registry->{$_} )
+      for keys %$destruction_registry;
+
     # Dummy NEXTSTATE ensuring the all temporaries on the stack are garbage
     # collected before leaving this scope. Depending on the code above, this
     # may very well be just a preventive measure guarding future modifications