summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-15 21:26:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-15 21:26:17 +0000
commitdb9344149320870fd92d24b704f673e4880b2b6a (patch)
treef6fd72d7e22e728fb3f188e0f21e3ac38eaab479 /perl-install/interactive.pm
parent851338fe8bf4c8d057984431b542b333cbad4b8e (diff)
downloaddrakx-backup-do-not-use-db9344149320870fd92d24b704f673e4880b2b6a.tar
drakx-backup-do-not-use-db9344149320870fd92d24b704f673e4880b2b6a.tar.gz
drakx-backup-do-not-use-db9344149320870fd92d24b704f673e4880b2b6a.tar.bz2
drakx-backup-do-not-use-db9344149320870fd92d24b704f673e4880b2b6a.tar.xz
drakx-backup-do-not-use-db9344149320870fd92d24b704f673e4880b2b6a.zip
no_comment
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 60a0fb419..b797b8fc5 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -154,6 +154,17 @@ sub ask_from_list2_with_help($$$$$;$) {
$o->ask_from_list_with_helpW($title, [ deref($message) ], $l, $help, $def || $l->[0]);
}
+sub ask_from_treelistf {
+ my ($o, $title, $message, $separator, $f, $l, $def) = @_;
+ my (@l,%l); my $i = 0; foreach (@$l) {
+ my $v = $f->($_, $i++);
+ push @l, $v;
+ $l{$v} = $_;
+ }
+ my $r = ask_from_treelist($o, $title, $message, $separator, \@l, defined $def ? $f->($def) : $def) or return;
+ $l{$r};
+}
+
sub ask_from_treelist {
my ($o, $title, $message, $separator, $l, $def) = @_;
$o->ask_from_treelistW($title, [ deref($message) ], $separator, [ sort @$l ], $def || $l->[0]);