From 35a86eeb69968a8c5327e3a4dfcc4e6f96fceee1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 12 Apr 2001 12:32:59 +0000 Subject: (ask_from_entries_refH_powered_normalize): - when not_edit and empty list, die. - when not_edit and single element list, don't display that entry. --- perl-install/interactive.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 596b40d15..567c2cef8 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -245,8 +245,12 @@ sub ask_from_entries_refH_powered_normalize { $e->{disabled} ||= sub { 0 }; } - #- don't display empty lists - @$l = grep { !($_->{list} && @{$_->{list}} == () && $_->{not_edit}) } @$l; + #- don't display empty lists and one element lists + @$l = grep { + my $b = $_->{list} && $_->{not_edit}; + @{$_->{list}} == () and die 'ask_from_list: empty list'; + !($b && @{$_->{list}} <= 1); + } @$l; $common->{advanced_label} ||= _("Advanced"); $common->{$_} = [ deref($common->{$_}) ] foreach qw(messages advanced_messages); -- cgit v1.2.1