summaryrefslogtreecommitdiffstats
path: root/perl-install/modules/modules_conf.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/modules/modules_conf.pm')
-rw-r--r--perl-install/modules/modules_conf.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/perl-install/modules/modules_conf.pm b/perl-install/modules/modules_conf.pm
index fc9f92179..c0944010d 100644
--- a/perl-install/modules/modules_conf.pm
+++ b/perl-install/modules/modules_conf.pm
@@ -9,14 +9,25 @@ our @ISA = qw(modules::any_conf);
sub file { '/etc/modules.conf' }
sub handled_fields { qw(alias above options probeall) }
+sub mapping {
+ my ($_conf, @modules) = @_;
+ my @l = map { modules::mapping_26_24($_) } @modules;
+ wantarray ? @l : $l[0];
+}
+
sub get_above {
my ($conf, $module) = @_;
+ $module = $conf->mapping($module);
+
$conf->{$module} && $conf->{$module}{above};
}
sub set_above {
my ($conf, $module, $o_modules) = @_;
+ $module = $conf->mapping($module);
+
if ($o_modules) {
- $conf->{$module}{above} = $o_modules;
+ my $modules = join(' ', $conf->mapping(split(' ', $o_modules)));
+ $conf->{$module}{above} = $modules;
} else {
delete $conf->{$module}{above};
}