summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Compression
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/Compression
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/Compression')
-rw-r--r--scripts/Dpkg/Compression/Process.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/Dpkg/Compression/Process.pm b/scripts/Dpkg/Compression/Process.pm
index 8ee5a57a0..39753a68d 100644
--- a/scripts/Dpkg/Compression/Process.pm
+++ b/scripts/Dpkg/Compression/Process.pm
@@ -125,9 +125,9 @@ sub _sanity_check {
if $self->{pid};
# Check options
my $to = my $from = 0;
- foreach (qw(file handle string pipe)) {
- $to++ if $opts{"to_$_"};
- $from++ if $opts{"from_$_"};
+ foreach my $thing (qw(file handle string pipe)) {
+ $to++ if $opts{"to_$thing"};
+ $from++ if $opts{"from_$thing"};
}
croak 'exactly one to_* parameter is needed' if $to != 1;
croak 'exactly one from_* parameter is needed' if $from != 1;