From 0d5e17af7391fb0d3a3c695dac40f8df41f8b11c Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 30 Sep 2014 04:33:42 +0200 Subject: 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 --- scripts/Dpkg/Compression/Process.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/Dpkg/Compression/Process.pm') 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; -- cgit v1.2.3