From c2f200920f04dba0874c054038770a91a71fbba5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 7 Jan 2003 13:22:28 +0000 Subject: use "if any" instead of "if grep", and various other occurences of "any", "every", "partition" --- perl-install/interactive/newt.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/interactive/newt.pm') 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; -- cgit v1.2.1