The following commit has been merged in the master branch:
commit 9f4b98fab6fe3db6c1d80b83b4affa22c540d5cf
Author: Guillem Jover <[email protected]>
Date:   Wed Jan 9 19:25:28 2013 +0100

    dpkg-source: Use two eq operators instead of a grep
    
    This avoids using grep on scalar context.
    
    Fixes BuiltinFunctions::ProhibitBooleanGrep.

diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index a3e4f40..6d170da 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -286,7 +286,7 @@ if ($options{opmode} =~ 
/^(-b|--print-format|--(before|after)-build|--commit)$/)
                         error(_g('architecture %s only allowed on its ' .
                                  "own (list for package %s is `%s')"),
                               $a, $p, $a)
-                            if grep($a eq $_, 'any', 'all');
+                            if $a eq 'any' or $a eq 'all';
                         push(@sourcearch, $a) unless $archadded{$a}++;
                     }
                 }
diff --git a/test/100_critic.t b/test/100_critic.t
index 4f86729..ad3f87f 100644
--- a/test/100_critic.t
+++ b/test/100_critic.t
@@ -34,6 +34,7 @@ if (not eval { require Perl::Critic::Utils }) {
 }
 
 my @policies = qw(
+    BuiltinFunctions::ProhibitBooleanGrep
     BuiltinFunctions::ProhibitLvalueSubstr
     BuiltinFunctions::ProhibitReverseSortBlock
     BuiltinFunctions::ProhibitSleepViaSelect

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to