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.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 5d4254cc1..55abb5b23 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -113,6 +113,35 @@ sub ask_from_list2($$$$;$) {
$o->ask_from_listW($title, [ deref($message) ], $l, $def || $l->[0]);
}
+sub ask_from_list_with_help_ {
+ my ($o, $title, $message, $l, $help, $def) = @_;
+ @$l == 0 and die '';
+ @$l == 1 and return $l->[0];
+ goto &ask_from_list2_with_help_;
+}
+
+sub ask_from_list_with_help {
+ my ($o, $title, $message, $l, $help, $def) = @_;
+ @$l == 0 and die '';
+ @$l == 1 and return $l->[0];
+ goto &ask_from_list2_with_help;
+}
+
+sub ask_from_list2_with_help_($$$$$;$) {
+ my ($o, $title, $message, $l, $help, $def) = @_;
+ untranslate(
+ ask_from_list_with_help($o, $title, $message, [ map { translate($_) } @$l ], $help, translate($def)),
+ @$l);
+}
+
+sub ask_from_list2_with_help($$$$$;$) {
+ my ($o, $title, $message, $l, $help, $def) = @_;
+
+ @$l > 10 and $l = [ sort @$l ];
+
+ $o->ask_from_list_with_helpW($title, [ deref($message) ], $l, $help, $def || $l->[0]);
+}
+
sub ask_from_treelist {
my ($o, $title, $message, $separator, $l, $def) = @_;
$o->ask_from_treelistW($title, [ deref($message) ], $separator, [ sort @$l ], $def || $l->[0]);