[lintian] 02/05: application-not-library: Use any instead of grep in boolean context
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch ppt-lc-mover
in repository lintian.
commit fece79a3ef2e9b650bf1471848318b0ef108b295
Author: Axel Beckert <abe@deuxchevaux.org>
Date: Tue Aug 11 15:55:38 2015 +0200
application-not-library: Use any instead of grep in boolean context
Suggested by nthykier.
---
checks/application-not-library.pm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/checks/application-not-library.pm b/checks/application-not-library.pm
index 51a238c..1508b6c 100644
--- a/checks/application-not-library.pm
+++ b/checks/application-not-library.pm
@@ -24,6 +24,7 @@ use strict;
use warnings;
use Lintian::Tags qw(tag);
+use List::Util qw(any);
sub run {
my ($pkg, $type, $info, $proc, $group) = @_;
@@ -41,10 +42,7 @@ sub run {
$pkg =~ /^gem2deb/ or # ruby packaging stuff
$pkg =~ /^xulrunner/ or # rendering engine
$pkg =~ /^lib.*-(utils|tools|bin|dev)/ or # generic library helpers
- scalar(
- grep { $pkg eq $_ }
- qw(rake bundler coderay kdelibs-bin) # whitelist
- );
+ any { $pkg eq $_ } qw(rake bundler coderay kdelibs-bin); # whitelist
my @programs = ();
foreach my $binpath (qw(bin sbin usr/bin usr/sbin usr/games)) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: