summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-04 12:40:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-04 12:40:19 +0000
commite81614106311688a1932251f23ac42ad04ada4fe (patch)
tree5644b49fb23e5ee78b6283a8b2b8c2194d1711fc /perl-install/keyboard.pm
parentbe575c0c81a3a2dc6b62abc220bdbc3f5aec09f9 (diff)
downloaddrakx-e81614106311688a1932251f23ac42ad04ada4fe.tar
drakx-e81614106311688a1932251f23ac42ad04ada4fe.tar.gz
drakx-e81614106311688a1932251f23ac42ad04ada4fe.tar.bz2
drakx-e81614106311688a1932251f23ac42ad04ada4fe.tar.xz
drakx-e81614106311688a1932251f23ac42ad04ada4fe.zip
do not use "local *F"
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 43da34803..74dc03cce 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -371,8 +371,7 @@ sub load {
$magic != $KMAP_MAGIC and die "failed to read kmap magic";
- local *F;
- sysopen F, "/dev/console", 2 or die "failed to open /dev/console: $!";
+ sysopen(my $F, "/dev/console", 2) or die "failed to open /dev/console: $!";
my $count = 0;
foreach (0 .. c::MAX_NR_KEYMAPS() - 1) {
@@ -385,7 +384,7 @@ sub load {
foreach my $value (@keymap) {
$key++;
c::KTYP($value) != c::KT_SPEC() or next;
- ioctl(F, c::KDSKBENT(), pack("CCS", $_, $key, $value)) or die "keymap ioctl failed ($_ $key $value): $!";
+ ioctl($F, c::KDSKBENT(), pack("CCS", $_, $key, $value)) or die "keymap ioctl failed ($_ $key $value): $!";
}
$count++;
}
@@ -445,10 +444,10 @@ sub setup {
if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$kmap.bkmap")) {
load(scalar cat_($f));
} else {
- local *F;
- if (my $pid = open F, "-|") {
+ my $F;
+ if (my $pid = open $F, "-|") {
local $/ = undef;
- eval { load(join('', <F>)) };
+ eval { load(join('', <$F>)) };
waitpid $pid, 0;
} else {
eval {