summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control/HashCore.pm
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-03-30 21:20:22 +0200
committerGuillem Jover <guillem@debian.org>2014-04-21 07:07:55 +0200
commit7e7156bee2e03e6f5103b330c615387919faa94d (patch)
treeaef7508d6b461f3d1df5dbafd806d05706e5babc /scripts/Dpkg/Control/HashCore.pm
parentca5c1088f961a3ddd728f4681a7b8018be9bff53 (diff)
downloaddpkg-7e7156bee2e03e6f5103b330c615387919faa94d.tar.gz
scripts: Localize $_ in functions with while (<$fh>) style loops
This way we make sure we don't affect the $_ value for the caller, in case it was being used.
Diffstat (limited to 'scripts/Dpkg/Control/HashCore.pm')
-rw-r--r--scripts/Dpkg/Control/HashCore.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index 7d13286f8..6c1df0b80 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -186,6 +186,7 @@ sub parse {
my $parabody = 0;
my $cf; # Current field
my $expect_pgp_sig = 0;
+ local $_;
while (<$fh>) {
s/\s*\n$//;