summaryrefslogtreecommitdiffstats
path: root/perl-install/scanner.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 18:04:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 18:04:39 +0000
commit07ef1cb49605b7d2df578a79f5eee812f87a7062 (patch)
treef9bd0409fa11aaa14627a413237d0696b8754be1 /perl-install/scanner.pm
parent5a7014d19c1843b37e135e34ab3e973b706de07e (diff)
downloaddrakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar.gz
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar.bz2
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.tar.xz
drakx-07ef1cb49605b7d2df578a79f5eee812f87a7062.zip
make perl_checker happy
Diffstat (limited to 'perl-install/scanner.pm')
-rwxr-xr-xperl-install/scanner.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index 52d5bbed5..4daf2e1c4 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -27,6 +27,7 @@ package scanner;
use standalone;
use common;
use detect_devices;
+use log;
my $_sanedir = "$prefix/etc/sane.d";
@@ -35,7 +36,7 @@ $scannerDB = readScannerDB("$_scannerDBdir/ScannerDB");
sub confScanner {
my ($model, $port) = @_;
- $port = detect_devices::dev_is_devfs() ? "$prefix/dev/usb/scanner0" : "$prefix/dev/scanner" if (!$port);
+ $port = detect_devices::dev_is_devfs() ? "$prefix/dev/usb/scanner0" : "$prefix/dev/scanner" if !$port;
my $a = $scannerDB->{$model}{server};
#print "file:[$a]\t[$model]\t[$port]\n| ", (join "\n| ", @{$scannerDB->{$model}{lines}}),"\n";
output("$_sanedir/$a.conf", (join "\n",@{$scannerDB->{$model}{lines}}));
@@ -88,7 +89,7 @@ sub readScannerDB {
LINE => sub { push @{$card->{lines}}, $val },
NAME => sub {
#$cards{$card->{type}} = $card if ($card and !$card->{flags}{unsupported});
- $cards{$card->{type}} = $card if ($card);
+ $cards{$card->{type}} = $card if $card;
$val =~ s/Seiko\s+Epson/Epson/i;
$card = { type => $val };
},
@@ -127,7 +128,7 @@ sub updateScannerDBfromUsbtable {
print F "# generated from usbtable by scannerdrake\n";
foreach (cat_("$ENV{SHARE_PATH}/ldetect-lst/usbtable")) {
my ($vendor_id, $product_id, $mod, $name) = chomp_(split /\s/,$_,4);
- next unless ($mod eq "\"scanner\"");
+ next if $mod ne '"scanner"';
$name =~ s/\"(.*)\"$/$1/;
if (member($name, keys %$scanner::scannerDB)) {
print "#[$name] already in ScannerDB!\n";
@@ -186,7 +187,7 @@ sub updateScannerDBfromSane {
print "#[$name] already in ScannerDB!\n";
} else {
print Y "\nNAME $name\nSERVER $backend\nDRIVER $intf\n";
- print Y "COMMENT $comment\n" if ($comment);
+ print Y "COMMENT $comment\n" if $comment;
$comment = undef;
}
$name = $val;