summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-12 10:16:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-12 10:16:43 +0000
commitb918f3e9dcd00feb55e52d28ba526a45b721f70e (patch)
treef9f2ddef9e9dd4448b9a51edc7a90deb37299965 /perl-install/mouse.pm
parent901e973c02516d4fd0f7e65d9f807d6553d375a9 (diff)
downloaddrakx-b918f3e9dcd00feb55e52d28ba526a45b721f70e.tar
drakx-b918f3e9dcd00feb55e52d28ba526a45b721f70e.tar.gz
drakx-b918f3e9dcd00feb55e52d28ba526a45b721f70e.tar.bz2
drakx-b918f3e9dcd00feb55e52d28ba526a45b721f70e.tar.xz
drakx-b918f3e9dcd00feb55e52d28ba526a45b721f70e.zip
cleanup
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm18
1 files changed, 10 insertions, 8 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 02ed41b69..a573c9c65 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -305,14 +305,16 @@ sub detect() {
#- probe serial device to make sure a wacom has been detected.
eval { modules::load("serial") };
- my ($r, @serial_wacom) = mouseconfig(); push @wacom, @serial_wacom;
- $r and return { wacom => \@wacom, %$r };
-
- #- in case only a wacom has been found, assume an inexistant mouse (necessary).
- @wacom and return fullname2mouse('none|No mouse', wacom => \@wacom);
-
- #- defaults to generic serial mouse on ttyS0.
- fullname2mouse("serial|Generic 2 Button Mouse", unsafe => 1);
+ my ($serial_mouse, @serial_wacom) = mouseconfig(); push @wacom, @serial_wacom;
+ if ($serial_mouse) {
+ { wacom => \@wacom, %$serial_mouse };
+ } elsif (@wacom) {
+ #- in case only a wacom has been found, assume an inexistant mouse (necessary).
+ fullname2mouse('none|No mouse', wacom => \@wacom);
+ } else {
+ #- defaults to generic serial mouse on ttyS0.
+ fullname2mouse("serial|Generic 2 Button Mouse", unsafe => 1);
+ }
}
sub load_modules {