summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control/HashCore.pm
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-09-30 04:33:42 +0200
committerGuillem Jover <guillem@debian.org>2014-10-06 00:27:22 +0200
commit0d5e17af7391fb0d3a3c695dac40f8df41f8b11c (patch)
treec0ea75ea3022826d4b76e2b15039cf11da0be62b /scripts/Dpkg/Control/HashCore.pm
parentf85c96ff672cfd9c1526a8387f088dbfc51df569 (diff)
downloaddpkg-0d5e17af7391fb0d3a3c695dac40f8df41f8b11c.tar.gz
scripts: Use named variables instead of using the topic variable
Switch code that uses roughly more explicit instances of the topic variable than implicit ones. Addresses BuiltinFunctions::ProhibitUselessTopic. Warned-by: perlcritic
Diffstat (limited to 'scripts/Dpkg/Control/HashCore.pm')
-rw-r--r--scripts/Dpkg/Control/HashCore.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index 3128f788c..04cbdee9b 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -510,8 +510,8 @@ sub DELETE {
sub FIRSTKEY {
my $self = shift;
my $parent = $self->[1];
- foreach (@{$parent->{in_order}}) {
- return $_ if exists $self->[0]->{lc($_)};
+ foreach my $key (@{$parent->{in_order}}) {
+ return $key if exists $self->[0]->{lc $key};
}
}
@@ -519,11 +519,11 @@ sub NEXTKEY {
my ($self, $last) = @_;
my $parent = $self->[1];
my $found = 0;
- foreach (@{$parent->{in_order}}) {
+ foreach my $key (@{$parent->{in_order}}) {
if ($found) {
- return $_ if exists $self->[0]->{lc($_)};
+ return $key if exists $self->[0]->{lc $key};
} else {
- $found = 1 if $_ eq $last;
+ $found = 1 if $key eq $last;
}
}
return;