summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/harddrake/ui.pmbin10357 -> 9858 bytes
-rw-r--r--perl-install/modparm.pm25
2 files changed, 14 insertions, 11 deletions
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm
index 413d4cf0f..4e0f2dd6a 100644
--- a/perl-install/harddrake/ui.pm
+++ b/perl-install/harddrake/ui.pm
Binary files differ
diff --git a/perl-install/modparm.pm b/perl-install/modparm.pm
index baeab41f8..f31a0178e 100644
--- a/perl-install/modparm.pm
+++ b/perl-install/modparm.pm
@@ -9,6 +9,17 @@ use strict;
use common;
use modules;
+sub parameter_type {
+ my ($min, $max, $is_a_number) = @_;
+ $min == 1 && $max == 1 ?
+ ($is_a_number ? _("a number") : '') :
+ $min == $max ?
+ ($is_a_number ? _("%d comma separated numbers", $min) : _("%d comma separated strings", $min)) :
+ $min == 1 ?
+ ($is_a_number ? _("comma separated numbers") : _("comma separated strings")) :
+ ''; #- to weird and buggy, do not display it
+}
+
sub raw_parameters {
my ($module) = @_;
@@ -55,17 +66,9 @@ sub parameters {
my ($module) = @_;
my @parameters ;
foreach (raw_parameters($module)) {
- my ($name, $format_, $description, $min, $max, $is_a_number) = @$_;
- my $format =
- $min == 1 && $max == 1 ?
- ($is_a_number ? _("a number") : '') :
- $min == $max ?
- ($is_a_number ? _("%d comma separated numbers", $min) : _("%d comma separated strings", $min)) :
- $min == 1 ?
- ($is_a_number ? _("comma separated numbers") : _("comma separated strings")) :
- ''; #- to weird and buggy, do not display it
-
- push @parameters, [ $format ? "$name ($format)" : $name, $description ];
+ my ($name, undef, $description, $min, $max, $is_a_number) = @$_;
+ my $format = parameter_type($min, $max, $is_a_number);
+ push @parameters, [ $format ? "$name ($format)" : $name, $description ];
}
@parameters;
}