summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-09-13 10:08:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-09-13 10:08:16 +0000
commit66a9e8fab73fbb74892bdba745e4dd31f508f5ab (patch)
tree1c61443217b2bb76007dafa643cdd8a67eef9652 /perl-install/keyboard.pm
parent222e36ab7e6133a0099896e6b47b6b37947d437a (diff)
downloaddrakx-66a9e8fab73fbb74892bdba745e4dd31f508f5ab.tar
drakx-66a9e8fab73fbb74892bdba745e4dd31f508f5ab.tar.gz
drakx-66a9e8fab73fbb74892bdba745e4dd31f508f5ab.tar.bz2
drakx-66a9e8fab73fbb74892bdba745e4dd31f508f5ab.tar.xz
drakx-66a9e8fab73fbb74892bdba745e4dd31f508f5ab.zip
- keyboard::read() now returns false if the value is not recognised
- new function keyboard::read_or_default() which always returns a valid value
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index c8cf30e24..5aeb07900 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -626,8 +626,9 @@ sub read() {
if (!$keyboard{KEYBOARD}) {
add2hash(\%keyboard, grep { keyboard2kmap($_) eq $keyboard{KEYTABLE} } keyboards());
}
- keyboard2text(\%keyboard) ? \%keyboard : {};
+ keyboard2text(\%keyboard) && \%keyboard;
}
+sub read_or_default() { &read() || default() }
sub check() {
$^W = 0;