# 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;
}
}
if (RENAME_SUB) {
if (! defined $sub_utils_loaded ) {
$sub_utils_loaded = do {
+
+ # when changing version also change in Makefile.PL
my $sn_ver = 0.04;
eval { require Sub::Name; Sub::Name->VERSION($sn_ver) }
or die "Sub::Name $sn_ver required when running under -d or equivalent: $@";
+ # when changing version also change in Makefile.PL
my $si_ver = 0.04;
eval { require Sub::Identify; Sub::Identify->VERSION($si_ver) }
or die "Sub::Identify $si_ver required when running under -d or equivalent: $@";