diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 13:22:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 13:22:28 +0000 |
commit | c2f200920f04dba0874c054038770a91a71fbba5 (patch) | |
tree | 7448485cea94afcd511535b592b1f061c543f3b9 /perl-install/pkgs.pm | |
parent | 0a813b0ea3c7c30ca81e79b6303f5141e95fee4b (diff) | |
download | drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.gz drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.bz2 drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.xz drakx-c2f200920f04dba0874c054038770a91a71fbba5.zip |
use "if any" instead of "if grep", and various other occurences of "any", "every", "partition"
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 0f45ec00d..adf370d09 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -486,7 +486,7 @@ sub read_rpmsrate { } if ($data) { # has packages on same line - my ($rate) = grep { /^\d$/ } @m or die sprintf qq(missing rate for "%s" at line %d (flags are %s)\n), $data, $line_nb, join('&&', @m); + my $rate = find { /^\d$/ } @m or die sprintf qq(missing rate for "%s" at line %d (flags are %s)\n), $data, $line_nb, join('&&', @m); foreach (split ' ', $data) { if ($packages) { my $p = packageByName($packages, $_) or next; @@ -555,7 +555,7 @@ sub saveCompssUsers { $flat .= $compssUsers->{$_}{verbatim}; foreach my $p (@{$packages->{depslist}}) { my @flags = $p->rflags; - if ($p->rate && grep { grep { !/^!/ && $fl{$_} } split('\|\|') } @flags) { + if ($p->rate && any { any { !/^!/ && $fl{$_} } split('\|\|') } @flags) { $flat .= sprintf "\t%d %s\n", $p->rate, $p->name; } } @@ -571,7 +571,7 @@ sub setSelectedFromCompssList { my @flags = $p->rflags; next if !$p->rate || $p->rate < $min_level || - grep { !grep { /^!(.*)/ ? !$compssUsersChoice->{$1} : $compssUsersChoice->{$_} } split('\|\|') } @flags; + any { !any { /^!(.*)/ ? !$compssUsersChoice->{$1} : $compssUsersChoice->{$_} } split('\|\|') } @flags; #- determine the packages that will be selected when #- selecting $p. the packages are not selected. |