summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-05-25 11:53:46 +0200
committerNicholas Clark <nick@ccl4.org>2013-05-25 11:53:46 +0200
commit58219fbdb5667e308f41b6b3c657398f6fead3e8 (patch)
treeb850fd418bae8bd5e4185deedc0e9a8b6a36d2f6
parent45827d0e0d57e61fc650a02ab83c6b2f206be0ba (diff)
downloadperl-58219fbdb5667e308f41b6b3c657398f6fead3e8.tar.gz
In the debugger use local $ENV{MANPATH}, instead of a work around.
local on regular hashes was fixed to delete elements it added by commit 1f5346dc23a1f0ea in Dec 2000. The analogous fix for tied hashes was made by commit c39e6ab0a7545b7a in May 2002. So the work around can go.
-rw-r--r--lib/perl5db.pl9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 33d361ea19..0705341ef7 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -8916,8 +8916,7 @@ sub runman {
chop $manpath if $manpath;
# harmless if missing, I figure
- my $oldpath = $ENV{MANPATH};
- $ENV{MANPATH} = $manpath if $manpath;
+ local $ENV{MANPATH} = $manpath if $manpath;
my $nopathopt = $^O =~ /dunno what goes here/;
if (
CORE::system(
@@ -8951,12 +8950,6 @@ sub runman {
}
}
} ## end if (CORE::system($doccmd...
- if ( defined $oldpath ) {
- $ENV{MANPATH} = $manpath;
- }
- else {
- delete $ENV{MANPATH};
- }
} ## end sub runman
#use Carp; # This did break, left for debugging