summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-24 22:32:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-24 22:32:49 +0000
commitc04107ac8b16c99e2ab2b4b2a255e67f5eba3ae2 (patch)
tree07e62a839825ac7137fba84b294deda0e9ba6f0b
parent8f4c9f2919a0a875d70ac2ab4fe47307f2fd7d9c (diff)
downloaddrakx-backup-do-not-use-c04107ac8b16c99e2ab2b4b2a255e67f5eba3ae2.tar
drakx-backup-do-not-use-c04107ac8b16c99e2ab2b4b2a255e67f5eba3ae2.tar.gz
drakx-backup-do-not-use-c04107ac8b16c99e2ab2b4b2a255e67f5eba3ae2.tar.bz2
drakx-backup-do-not-use-c04107ac8b16c99e2ab2b4b2a255e67f5eba3ae2.tar.xz
drakx-backup-do-not-use-c04107ac8b16c99e2ab2b4b2a255e67f5eba3ae2.zip
(get_both): fix returning one element (eg: get_keyboard)
-rw-r--r--perl-install/Xconfig/xfree.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/Xconfig/xfree.pm b/perl-install/Xconfig/xfree.pm
index 7b6ba3e37..43c4fe885 100644
--- a/perl-install/Xconfig/xfree.pm
+++ b/perl-install/Xconfig/xfree.pm
@@ -43,7 +43,7 @@ sub get_both {
my @l3 = $both->{xfree3}->$getter;
my @l4 = $both->{xfree4}->$getter;
- mapn {
+ my @r = mapn {
my ($h3, $h4) = @_;
my %h = %$h4;
foreach (keys %$h3) {
@@ -63,6 +63,8 @@ sub get_both {
}
\%h;
} \@l3, \@l4;
+
+ @r == 1 ? $r[0] : @r;
}
sub set_both {
my ($setter, $both, @l) = @_;