This should work around perlbug #37102.
p4raw-id: //depot/perl@25721
push(@stack, $DB::single);
$DB::single &= 1;
$DB::single |= 4 if $#stack == $deep;
-# print $DB::sub, "\n";
- if ($DB::sub =~ /(?:^|::)DESTROY$/ or not defined wantarray) {
+ if ($DB::sub eq 'DESTROY' or substr($DB::sub, -9) eq '::DESTROY' or not defined wantarray) {
&$DB::sub;
$DB::single |= pop(@stack);
$DB::ret = undef;