summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/office.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/office.pm
parentb6c81a431dc681db51eaf22eaf090c280b56d9f4 (diff)
downloaddrakx-backup-do-not-use-78dd1c5b452725709f60ea017882031a4cab38e5.tar
drakx-backup-do-not-use-78dd1c5b452725709f60ea017882031a4cab38e5.tar.gz
drakx-backup-do-not-use-78dd1c5b452725709f60ea017882031a4cab38e5.tar.bz2
drakx-backup-do-not-use-78dd1c5b452725709f60ea017882031a4cab38e5.tar.xz
drakx-backup-do-not-use-78dd1c5b452725709f60ea017882031a4cab38e5.zip
perl_checker fixes
Diffstat (limited to 'perl-install/printer/office.pm')
-rw-r--r--perl-install/printer/office.pm16
1 files changed, 6 insertions, 10 deletions
diff --git a/perl-install/printer/office.pm b/perl-install/printer/office.pm
index fb905107d..eccde17b5 100644
--- a/perl-install/printer/office.pm
+++ b/perl-install/printer/office.pm
@@ -44,8 +44,7 @@ sub configureoffice {
# Do we have Star Office installed?
my $configfilename = find_config_file($suite);
return 1 unless $configfilename;
- $configfilename =~ m!$suites->{$suite}{file_name}!;
- my $configprefix = $1;
+ my $configprefix = $1 if $configfilename =~ m!$suites->{$suite}{file_name}!;
# Load Star Office printer config file
my $configfilecontent = cat_("$::prefix$configfilename");
# Update remote CUPS queues
@@ -53,7 +52,7 @@ sub configureoffice {
(-x "$::prefix/usr/bin/curl" || -x "$::prefix/usr/bin/wget")) {
my @printerlist = printer::cups::get_remote_queues();
foreach my $listentry (@printerlist) {
- next unless ($listentry =~ /^([^\|]+)\|([^\|]+)$/);
+ next unless $listentry =~ /^([^\|]+)\|([^\|]+)$/;
my $queue = $1;
my $server = $2;
if (-x "$::prefix/usr/bin/wget") {
@@ -119,8 +118,7 @@ sub add_cups_remote_to_office {
# Do we have Star Office installed?
my $configfilename = find_config_file($suite);
return 1 unless $configfilename;
- $configfilename =~ m!$suites->{$suite}{file_name}!;
- my $configprefix = $1;
+ my $configprefix = $1 if $configfilename =~ m!$suites->{$suite}{file_name}!;
# Load Star Office printer config file
my $configfilecontent = cat_("$::prefix$configfilename");
# Update remote CUPS queues
@@ -128,7 +126,7 @@ sub add_cups_remote_to_office {
(-x "$::prefix/usr/bin/curl" || -x "$::prefix/usr/bin/wget")) {
my @printerlist = printer::cups::get_remote_queues();
foreach my $listentry (@printerlist) {
- next unless ($listentry =~ /^([^\|]+)\|([^\|]+)$/);
+ next unless $listentry =~ /^([^\|]+)\|([^\|]+)$/;
my $q = $1;
next if $q ne $queue;
my $server = $2;
@@ -169,8 +167,7 @@ sub remove_printer_from_office {
# Do we have Star Office installed?
my $configfilename = find_config_file($suite);
return 1 unless $configfilename;
- $configfilename =~ m!$suites->{$suite}{file_name}!;
- my $configprefix = $1;
+ my $configprefix = $1 if $configfilename =~ m!$suites->{$suite}{file_name}!;
# Load Star Office printer config file
my $configfilecontent = cat_("$::prefix$configfilename");
# Remove the printer entry
@@ -186,8 +183,7 @@ sub remove_local_printers_from_office {
# Do we have Star Office installed?
my $configfilename = find_config_file($suite);
return 1 unless $configfilename;
- $configfilename =~ m!$suites->{$suite}{file_name}!;
- my $configprefix = $1;
+ my $configprefix = $1 if $configfilename =~ m!$suites->{$suite}{file_name}!;
# Load Star Office printer config file
my $configfilecontent = cat_("$::prefix$configfilename");
# Remove the printer entries