summaryrefslogtreecommitdiffstats
path: root/perl-install/network/drakfirewall.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-07 13:22:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-07 13:22:28 +0000
commitc2f200920f04dba0874c054038770a91a71fbba5 (patch)
tree7448485cea94afcd511535b592b1f061c543f3b9 /perl-install/network/drakfirewall.pm
parent0a813b0ea3c7c30ca81e79b6303f5141e95fee4b (diff)
downloaddrakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar
drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar.gz
drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar.bz2
drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar.xz
drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.zip
use "if any" instead of "if grep", and various other occurences of "any", "every", "partition"
Diffstat (limited to 'perl-install/network/drakfirewall.pm')
-rw-r--r--perl-install/network/drakfirewall.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm
index 8951ecd44..084a656fd 100644
--- a/perl-install/network/drakfirewall.pm
+++ b/perl-install/network/drakfirewall.pm
@@ -54,10 +54,9 @@ my @all_servers =
sub port2server {
my ($port) = @_;
- foreach (@all_servers) {
- return $_ if grep { $port eq $_ } split ' ', $_->{ports};
- }
- undef;
+ find {
+ any { $port eq $_ } split(' ', $_->{ports});
+ } @all_servers;
}
sub check_ports_syntax {
@@ -95,7 +94,7 @@ sub default_from_pkgs {
my @pkgs = $in->do_pkgs->are_installed(map { split ' ', $_->{pkg} } @all_servers);
[ grep {
my $s = $_;
- grep { member($_, @pkgs) } split ' ', $s->{pkg};
+ any { member($_, @pkgs) } (split ' ', $s->{pkg});
} @all_servers ];
}