summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
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
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/interactive')
-rw-r--r--perl-install/interactive/newt.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm
index 5c531f1fc..4660b987b 100644
--- a/perl-install/interactive/newt.pm
+++ b/perl-install/interactive/newt.pm
@@ -62,7 +62,7 @@ sub checkval { $_[0] && $_[0] ne ' ' ? '*' : ' ' }
sub ask_fromW {
my ($o, $common, $l, $l2) = @_;
- if (grep { $_->{type} ne 'button' } @$l or @$l < 5) {
+ if ((any { $_->{type} ne 'button' } @$l) || @$l < 5) {
&ask_fromW_real;
} else {
my $r;
@@ -220,7 +220,7 @@ sub ask_fromW_real {
my $r = $form->RunForm;
$canceled = $cancel && $$r == $$cancel;
- if (my ($button) = grep { $$r == ${$_->{w}} } @widgets) {
+ if (my $button = find { $$r == ${$_->{w}} } @widgets) {
$get_all->();
my $v = $button->{e}{clicked_may_quit}();
$form->FormDestroy;