summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.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/interactive.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/interactive.pm')
-rw-r--r--perl-install/interactive.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index a09f68f37..efc823418 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -306,7 +306,7 @@ sub ask_from_normalize {
$e->{type} ||= 'combo';
if (!$e->{not_edit}) {
- die q(when using "not_edit" you must use strings, not a data structure) if ref ${$e->{val}} || grep { ref $_ } @$li;
+ die q(when using "not_edit" you must use strings, not a data structure) if ref ${$e->{val}} || any { ref $_ } @$li;
}
if ($e->{type} ne 'combo' || $e->{not_edit}) {
${$e->{val}} = $li->[0] if !member(may_apply($e->{format}, ${$e->{val}}), map { may_apply($e->{format}, $_) } @$li);
@@ -360,11 +360,11 @@ sub ask_from_ {
sub ask_from_no_check {
my ($o, $common, $l) = @_;
ask_from_normalize($o, $common, $l);
- $o->ask_fromW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]);
+ $o->ask_fromW($common, partition { !$_->{advanced} } @$l);
}
sub ask_from_real {
my ($o, $common, $l) = @_;
- my $v = $o->ask_fromW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]);
+ my $v = $o->ask_fromW($common, partition { !$_->{advanced} } @$l);
%$common = ();
$v;
}