# when changing also change in Makefile.PL
my $b_h_eos_req = '0.07';
- if (eval {
+ if (! $ENV{NAMESPACE_CLEAN_USE_PP} and eval {
require B::Hooks::EndOfScope;
B::Hooks::EndOfScope->VERSION($b_h_eos_req);
1
push @$stack, namespace::clean::_ScopeGuard->arm(shift);
}
else {
+ my %old_contents = %^H;
+ %^H = ();
tie( %^H, 'namespace::clean::_TieHintHash', namespace::clean::_ScopeGuard->arm(shift) );
+ $^H{$_} = $old_contents{$_} for keys %old_contents;
}
}