summaryrefslogtreecommitdiffstats
path: root/perl-install/scanner.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/scanner.pm')
-rwxr-xr-xperl-install/scanner.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index 698d67c68..9d85129cc 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -64,7 +64,7 @@ sub detect {
DESCRIPTION => $_->{description},
#id => $_->{id},
#vendor => $_->{vendor},
- }};
+ } };
++$i;
}
foreach (grep { $_->{media_type} =~ /scanner/ } detect_devices::getSCSI()) {
@@ -181,8 +181,8 @@ sub updateScannerDBfromSane {
mfg => sub { $mfg = $val; $name = undef },#bug when a new mfg comes. should called $fs->{ $name }(); but ??
model => sub {
unless ($name) { $name = $val; next }
- $name = (member($mfg, keys %$sane2DB))
- ? (ref $sane2DB->{ $mfg }) ? $sane2DB->{ $mfg }($name) : "$sane2DB->{ $mfg }|$name" : "$mfg|$name";
+ $name = (member($mfg, keys %$sane2DB)) ?
+ (ref $sane2DB->{ $mfg}) ? $sane2DB->{ $mfg}($name) : "$sane2DB->{ $mfg }|$name" : "$mfg|$name";
if (member($name, keys %$scanner::scannerDB)) {
print "#[$name] already in ScannerDB!\n";
} else {
@@ -200,7 +200,7 @@ sub updateScannerDBfromSane {
s/\s+$//;
/^\;/ and next;
($cmd, $val) = /:(\S+)\s*\"([^\;]*)\"/ or next; #log::l("bad line $lineno ($_)"), next;
- my $f = $fs->{ $cmd };
+ my $f = $fs->{ $cmd};
$f ? $f->() : log::l("unknown line $lineno ($_)");
}
$fs->{model}(); # the last one