Переглянути джерело

dpkg-genbuildinfo: Use an intermediate variable to placate perlcritic

The code is fine, but perlcritic seems to have issues properly parsing
it. Let's help it by using an intermediate variable.

Addresses RegularExpressions::ProhibitUnusedCapture.

Warned-by: perlcritic
Guillem Jover 9 роки тому
батько
коміт
f43fd1f753
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      scripts/dpkg-genbuildinfo.pl

+ 2 - 1
scripts/dpkg-genbuildinfo.pl

@@ -106,7 +106,8 @@ sub parse_status {
         }
 
         if (/^(?:Pre-)?Depends: (.*)$/m) {
-            foreach (split /,\s*/, $1) {
+            my $depends = $1;
+            foreach (split /,\s*/, $depends) {
                 push @{$depends{"$package:$arch"}}, $_;
             }
         }