diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-22 11:26:53 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-22 11:26:53 +0000 |
commit | 5ccb00978c203295c4bf726a9530c8d696a9f286 (patch) | |
tree | 91ffea3e43557824bdc775e8b122af2320004961 /perl-install/interactive.pm | |
parent | 8507f5529c1fa95cf068076001adc1dbdc91e4fc (diff) | |
download | drakx-5ccb00978c203295c4bf726a9530c8d696a9f286.tar drakx-5ccb00978c203295c4bf726a9530c8d696a9f286.tar.gz drakx-5ccb00978c203295c4bf726a9530c8d696a9f286.tar.bz2 drakx-5ccb00978c203295c4bf726a9530c8d696a9f286.tar.xz drakx-5ccb00978c203295c4bf726a9530c8d696a9f286.zip |
no_comment
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r-- | perl-install/interactive.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 8096c4a0c..46c4250d1 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -97,12 +97,15 @@ sub ask_from_listf_ { } sub ask_from_listf { my ($o, $title, $message, $f, $l, $def) = @_; + my $def2; my (@l,%l); my $i = 0; foreach (@$l) { my $v = $f->($_, $i++); push @l, $v; $l{$v} = $_; + $def2 = $v if $def && $_ eq $def; } - my $r = ask_from_list($o, $title, $message, \@l, defined $def ? $f->($def) : $def) or return; + $def2 ||= $f->($def) if $def; + my $r = ask_from_list($o, $title, $message, \@l, $def2) or return; $l{$r}; } |