summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/gimp.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-19 14:14:22 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-19 14:14:22 +0000
commit78dd1c5b452725709f60ea017882031a4cab38e5 (patch)
tree8d17ee5946d711cf4e55ecc7123b6c04c1f773e9 /perl-install/printer/gimp.pm
parentb6c81a431dc681db51eaf22eaf090c280b56d9f4 (diff)
downloaddrakx-78dd1c5b452725709f60ea017882031a4cab38e5.tar
drakx-78dd1c5b452725709f60ea017882031a4cab38e5.tar.gz
drakx-78dd1c5b452725709f60ea017882031a4cab38e5.tar.bz2
drakx-78dd1c5b452725709f60ea017882031a4cab38e5.tar.xz
drakx-78dd1c5b452725709f60ea017882031a4cab38e5.zip
perl_checker fixes
Diffstat (limited to 'perl-install/printer/gimp.pm')
-rw-r--r--perl-install/printer/gimp.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/perl-install/printer/gimp.pm b/perl-install/printer/gimp.pm
index 61a3db1e2..dd36a514b 100644
--- a/perl-install/printer/gimp.pm
+++ b/perl-install/printer/gimp.pm
@@ -59,8 +59,8 @@ sub configure {
$configfilecontent =~
s/\n/\nCurrent-Printer: $printer->{DEFAULT}\n/s;
} else {
- $configfilecontent =~ /^\s*Current\-Printer\s*:\s*(\S+)\s*$/m;
- if (!isprinterconfigured($1, $configfilecontent)) {
+ if ($configfilecontent =~ /^\s*Current\-Printer\s*:\s*(\S+)\s*$/m &&
+ !isprinterconfigured($1, $configfilecontent)) {
$configfilecontent =~
s/(Current\-Printer\s*:\s*)\S+/$1$printer->{DEFAULT}/;
}
@@ -82,7 +82,7 @@ sub addcupsremoteto {
if ($printer->{SPOOLER} eq "cups" &&
(-x "$::prefix/usr/bin/curl" || -x "$::prefix/usr/bin/wget")) {
foreach my $listentry (@printerlist) {
- next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
+ next if $listentry !~ /^([^\|]+)\|([^\|]+)$/;
my $q = $1;
next if $q ne $queue;
my $server = $2;
@@ -174,13 +174,11 @@ sub makeprinterentry {
if ($ppd =~ /CUPS\s*\+\s*GIMP\s*\-\s*Print/im) {
# Native CUPS driver
$gimpprintqueue = 1;
- $ppd =~ /\s*\*ModelName:\s*\"(\S+)\"\s*$/im;
- $gimpprintdriver = $1;
+ $gimpprintdriver = $1 if $ppd =~ /\s*\*ModelName:\s*\"(\S+)\"\s*$/im;
} elsif ($ppd =~ /Foomatic\s*\+\s*gimp\s*\-\s*print/im) {
# GhostScript + Foomatic driver
$gimpprintqueue = 1;
- $ppd =~
- /\-sModel=((escp2|pcl|bjc|lexmark)\-[^\s\"\']*)/im;
+ $ppd =~ /\-sModel=((escp2|pcl|bjc|lexmark)\-[^\s\"']*)/im and
$gimpprintdriver = $1;
}
if ($gimpprintqueue) {
@@ -211,7 +209,7 @@ sub makeprinterentry {
return $configfile;
}
-sub findconfigfiles {
+sub findconfigfiles() {
my @configfilenames = (if_(-d "$::prefix/usr/lib/gimp/1.2", ".gimp-1.2/printrc"),
if_(-d "$::prefix/usr/lib/gimp/1.3", ".gimp-1.3/printrc"));
return () unless @configfilenames;