summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 9e3d8b6a3..3b296a982 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -107,7 +107,7 @@ sub ask_from_entry {
my ($o, $title, $message, $label, $def, %callback) = @_;
$message = ref $message ? $message : [ $message ];
- $o->ask_from_entries($title, $message, [ $label ], [ $def ], %callback);
+ first ($o->ask_from_entries($title, $message, [ $label ], [ $def ], %callback));
}
sub ask_from_entries($$$$;$%) {
@@ -126,11 +126,12 @@ sub ask_from_entries_ref($$$$;$%) {
my ($o, $title, $message, $l, $val, %callback) = @_;
$message = ref $message ? $message : [ $message ];
+
my $val_hash = [ map {
if ((ref $_) eq "SCALAR") {
{ val => $_ }
} else {
- ($_->{list} && @{$_->{list}}) ?
+ ($_->{list} && (@{$_->{list}} > 1)) ?
{ %$_, type => "list"} : $_;
}
} @$val ];