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.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index de9998145..dc846f42b 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -105,7 +105,14 @@ sub ask_from_entries_ref($$$$;$%) {
my ($o, $title, $message, $l, $val, %callback) = @_;
$message = ref $message ? $message : [ $message ];
- my $val_hash = [ map { (ref $_) eq "SCALAR" ? { val => $_ } : {(%{$_}, type => "list")}} @{$val} ];
+ my $val_hash = [ map
+ { if ((ref $_) eq "SCALAR") {
+ { val => $_ }
+ } else {
+ @{$_->{list}} ?
+ { (%{$_}, type => "list")} : {(%{$_})}
+ }
+ } @{$val} ];
$o->ask_from_entries_refW($title, $message, $l, $val_hash, %callback)