From 78e8097c578fb334c7440a5459fdb7aecc827feb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 14 Nov 2002 17:36:32 +0000 Subject: - add/remove spaces to make perl_checker happy - remove redundant parentheses - add some parentheses for clarity --- perl-install/printer/gimp.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'perl-install/printer/gimp.pm') diff --git a/perl-install/printer/gimp.pm b/perl-install/printer/gimp.pm index d9264fd81..c292e583c 100644 --- a/perl-install/printer/gimp.pm +++ b/perl-install/printer/gimp.pm @@ -79,7 +79,7 @@ sub addcupsremoteto { return 1 if $#configfilenames < 0; my @printerlist = printer::cups::get_remote_queues(); my $ppdfile = ""; - if (($printer->{SPOOLER} eq "cups") && + if ($printer->{SPOOLER} eq "cups" && ((-x "$::prefix/usr/bin/curl") || (-x "$::prefix/usr/bin/wget"))) { foreach my $listentry (@printerlist) { next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/); @@ -101,8 +101,7 @@ sub addcupsremoteto { } # Does the file exist and is it not an error message? if ((-r "$::prefix/etc/foomatic/$queue.ppd") && - (cat_("$::prefix/etc/foomatic/$queue.ppd") =~ - /^\*PPD-Adobe/)) { + cat_("$::prefix/etc/foomatic/$queue.ppd") =~ /^\*PPD-Adobe/) { $ppdfile = "/etc/foomatic/$queue.ppd"; } else { unlink "$::prefix/etc/foomatic/$queue.ppd"; @@ -224,11 +223,11 @@ sub findconfigfiles { chomp; if (/^([^:]+):[^:]*:([^:]+):([^:]+):[^:]*:([^:]+):[^:]*$/) { my ($username, $uid, $gid, $homedir) = ($1, $2, $3, $4); - if ((($uid == 0) || ($uid >= 500)) && ($username ne "nobody")) { + if (($uid == 0 || $uid >= 500) && $username ne "nobody") { foreach my $file (@configfilenames) { my $dir = "$homedir/$file"; $dir =~ s,/[^/]*$,,; - next if (-f $dir) && (! -d $dir); + next if (-f $dir) && ! -d $dir; if (! -d "$::prefix$dir") { mkdir_p("$::prefix$dir") or next; set_permissions("$::prefix$dir", "$uid.$gid") or next; -- cgit v1.2.1