summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.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/install_any.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/install_any.pm')
-rw-r--r--perl-install/install_any.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index da93883a2..352de196a 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -294,7 +294,7 @@ sub preConfigureTimezone {
$o->{timezone}{timezone} ||= timezone::bestTimezone(lang::lang2text($o->{lang}));
- my $utc = !grep { isFat($_) || isNT($_) } @{$o->{fstab}};
+ my $utc = every { !isFat($_) && !isNT($_) } @{$o->{fstab}};
my $ntp = timezone::ntp_server($o->{prefix});
add2hash_($o->{timezone}, { UTC => $utc, ntp => $ntp });
}
@@ -381,7 +381,7 @@ sub setDefaultPackages {
$o->{compssUsersChoice}{HIGH_SECURITY} = 1 if $o->{security} > 3;
$o->{compssUsersChoice}{BIGMEM} = 1 if !$::oem && availableRamMB() > 800 && arch() !~ /ia64/;
$o->{compssUsersChoice}{SMP} = 1 if detect_devices::hasSMP();
- $o->{compssUsersChoice}{CDCOM} = 1 if grep { $_->{descr} =~ /commercial/i } values %{$o->{packages}{mediums}};
+ $o->{compssUsersChoice}{CDCOM} = 1 if any { $_->{descr} =~ /commercial/i } values %{$o->{packages}{mediums}};
$o->{compssUsersChoice}{'3D'} = 1 if
detect_devices::matching_desc('Matrox.* G[245][05]0') ||
detect_devices::matching_desc('Rage X[CL]') ||
@@ -940,9 +940,9 @@ sub guess_mount_point {
my $handle = any::inspect($part, $prefix) or return;
my $d = $handle->{dir};
- my ($mnt) = grep { -e "$d/$l{$_}" } keys %l;
+ my $mnt = find { -e "$d/$l{$_}" } keys %l;
$mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$$user if -e "$d/.bashrc";
- $mnt ||= (grep { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bashrc" } glob_($d)) ? '/home' : '';
+ $mnt ||= (any { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bashrc" } glob_($d)) ? '/home' : '';
($mnt, $handle);
}
@@ -1104,7 +1104,7 @@ sub check_prog {
my @l = $f !~ m|^/| ?
map { "$_/$f" } split(":", $ENV{PATH}) :
$f;
- return if grep { -x $_ } @l;
+ return if any { -x $_ } @l;
common::usingRamdisk() or log::l("ERROR: check_prog can't find the program $f and we're not using ramdisk"), return;