7 undef &Regexp::DESTROY;
12 if ($] >= 5.011) { # doesn't leak on 5.10.x
13 $TODO = "leaking since 32751";
18 sub Regexp::DESTROY { $destroyed++ }
25 is( $destroyed, 1, "destroyed regexp" );
30 my $var = bless {}, "Foo";
31 my $rx = qr/(?{ $var })/;
34 is( $destroyed, 1, "destroyed regexp with closure capture" );