[dpkg] 166/187: dpkg-genbuildinfo: Use an intermediate variable to placate perlcritic

Reiner Herrmann reiner at reiner-h.de
Sun Nov 6 12:46:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

deki-guest pushed a commit to branch master
in repository dpkg.

commit f43fd1f753962228e0443c89f7274cc342f6694d
Author: Guillem Jover <guillem at debian.org>
Date:   Fri Nov 4 03:24:09 2016 +0100

    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
---
 scripts/dpkg-genbuildinfo.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/dpkg-genbuildinfo.pl b/scripts/dpkg-genbuildinfo.pl
index fcab703..031f010 100755
--- a/scripts/dpkg-genbuildinfo.pl
+++ b/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"}}, $_;
             }
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list