summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-08-28 16:51:57 +0000
committerFrancois Pons <fpons@mandriva.com>2000-08-28 16:51:57 +0000
commitc047aee8e84b723f6910defab8b0de8063502490 (patch)
treeb12ebc2155d800c65755beee26ab7c8c4cbc9e4d /perl-install/mouse.pm
parenta5be3a7fffa550e22e2a56ee40151b69c00afe8a (diff)
downloaddrakx-c047aee8e84b723f6910defab8b0de8063502490.tar
drakx-c047aee8e84b723f6910defab8b0de8063502490.tar.gz
drakx-c047aee8e84b723f6910defab8b0de8063502490.tar.bz2
drakx-c047aee8e84b723f6910defab8b0de8063502490.tar.xz
drakx-c047aee8e84b723f6910defab8b0de8063502490.zip
*** empty log message ***
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 30f3eaa31..af0a35a79 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -101,7 +101,7 @@ sub list { @mouses }
sub name2mouse {
my ($name) = @_;
foreach (@mouses) {
- return { %$_ } if $name eq $_->{FULLNAME};
+ $name eq $_->{FULLNAME} and return $_;
}
die "$name not found";
}
@@ -167,7 +167,7 @@ sub detect() {
return name2mouse("Apple ADB Mouse");
}
- detect_devices::hasMousePS2 and return { unsafe => 1, %{name2mouse("Generic Mouse (PS/2)")} };
+ detect_devices::hasMousePS2 and return { %{name2mouse("Generic Mouse (PS/2)")}, unsafe => 1 };
eval { commands::modprobe("serial") };
my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
@@ -186,6 +186,7 @@ sub detect() {
modules::unload("usbmouse");
}
- #- defaults to generic ttyS0
- { device => "ttyS0", unsafe => 1, %{name2mouse("Generic Mouse (serial)")} };
+ #- defaults to generic serial mouse on ttyS0.
+ #- Oops? using return let return a hash ref, if not using it, it return a list directly :-)
+ return { %{name2mouse("Generic Mouse (serial)")}, device => "ttyS0", unsafe => 1 };
}