summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/card.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/Xconfig/card.pm
parent0a813b0ea3c7c30ca81e79b6303f5141e95fee4b (diff)
downloaddrakx-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/Xconfig/card.pm')
-rw-r--r--perl-install/Xconfig/card.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index ece4ef2cb..f90e1cf3a 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -84,8 +84,8 @@ sub from_raw_X {
my ($xfree3_server) = readlink("$::prefix/etc/X11/X") =~ /XF86_(.*)/;
my $card = {
- use_UTAH_GLX => int(grep { /glx/ } $raw_X->{xfree3}->get_modules),
- use_DRI_GLX => int(grep { /dri/ } $raw_X->{xfree4}->get_modules),
+ use_UTAH_GLX => any { /glx/ } $raw_X->{xfree3}->get_modules,
+ use_DRI_GLX => any { /dri/ } $raw_X->{xfree4}->get_modules),
server => $xfree3_server,
prefer_xf3 => $xfree3_server && !$force_xf4,
%$device,
@@ -284,7 +284,7 @@ sub configure {
$card->{prog} = install_server($card, $options, $do_pkgs);
if ($card->{needVideoRam} && !$card->{VideoRam}) {
- $card->{VideoRam} = first(grep { $_ <= $options->{VideoRam_probed} } reverse ikeys %VideoRams) || 4096;
+ $card->{VideoRam} = (find { $_ <= $options->{VideoRam_probed} } reverse ikeys %VideoRams) || 4096;
$in->ask_from('', N("Select the memory size of your graphics card"),
[ { val => \$card->{VideoRam},
type => 'list',
@@ -361,7 +361,7 @@ sub multi_head_choices {
my @choices;
my $has_multi_head = @cards > 1 || $cards[0]{MULTI_HEAD} > 1;
- my $disable_multi_head = grep {
+ my $disable_multi_head = any {
$_->{Driver} or log::l("found card $_->{description} not supported by XF4, disabling multi-head support");
!$_->{Driver};
} @cards;