summaryrefslogtreecommitdiffstats
path: root/perl-install/printer
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-07-08 08:38:51 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-07-08 08:38:51 +0000
commitdba8fab056173ce124e1c151fb46277af8d35282 (patch)
treeda1a9e995525ba544e4348cd74cfee345d479648 /perl-install/printer
parenta86500e3c082c3985e22b76b7abbc9a59255f02b (diff)
downloaddrakx-backup-do-not-use-dba8fab056173ce124e1c151fb46277af8d35282.tar
drakx-backup-do-not-use-dba8fab056173ce124e1c151fb46277af8d35282.tar.gz
drakx-backup-do-not-use-dba8fab056173ce124e1c151fb46277af8d35282.tar.bz2
drakx-backup-do-not-use-dba8fab056173ce124e1c151fb46277af8d35282.tar.xz
drakx-backup-do-not-use-dba8fab056173ce124e1c151fb46277af8d35282.zip
reduce the overall perl_checker warnings
Diffstat (limited to 'perl-install/printer')
-rw-r--r--perl-install/printer/cups.pm8
-rw-r--r--perl-install/printer/main.pm28
-rw-r--r--perl-install/printer/printerdrake.pm124
3 files changed, 80 insertions, 80 deletions
diff --git a/perl-install/printer/cups.pm b/perl-install/printer/cups.pm
index 64b0df045..0ddff19f0 100644
--- a/perl-install/printer/cups.pm
+++ b/perl-install/printer/cups.pm
@@ -27,8 +27,8 @@ sub lpstat_lpv() {
my $currentitem = -1;
for my $line (@lpstat) {
- chomp ($line);
- if (!($line =~ m!^\s*$!)) {
+ chomp($line);
+ if ($line !~ m!^\s*$!) {
if ($line =~ m!^printer\s+(\S+)\s+(\S.*)$!) {
# Beginning of new printer's entry
my $name = $1;
@@ -51,7 +51,7 @@ sub lpstat_lpv() {
my $name = $1;
my $uri = $2;
if (defined($itemshash->{$name})) {
- if ($uri !~ /:/) {$uri = "file:" . $uri};
+ if ($uri !~ /:/) { $uri = "file:" . $uri }
$currentitem = $itemshash->{$name};
if (($currentitem <= $#items) &&
($items[$currentitem]{queuename} eq $name)) {
@@ -136,7 +136,7 @@ sub get_remote_queues {
sub queue_enabled {
my ($queue) = @_;
0 != grep {
- /\b$queue\b.*\benabled\b/i
+ /\b$queue\b.*\benabled\b/i;
} run_program::rooted_get_stdout($::prefix, 'lpstat', '-p', $queue);
}
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm
index 55b2ca727..7407fc691 100644
--- a/perl-install/printer/main.pm
+++ b/perl-install/printer/main.pm
@@ -80,9 +80,9 @@ sub printer_type($) {
sub SIGHUP_daemon {
my ($service) = @_;
- if ($service eq "cupsd") { $service = "cups" };
+ if ($service eq "cupsd") { $service = "cups" }
# PDQ and remote CUPS have no daemons, exit.
- if (($service eq "pdq") || ($service eq "rcups")) { return 1 };
+ if (($service eq "pdq") || ($service eq "rcups")) { return 1 }
# CUPS needs auto-correction for its configuration
run_program::rooted($::prefix, "/usr/sbin/correctcupsconfig") if $service eq "cups";
# Name of the daemon
@@ -741,7 +741,7 @@ sub set_jap_textmode {
# When installing CUPS later it will not work.
return 1 if (! -r "$::prefix/etc/cups/mime.convs");
substInFile {
- s!^(\s*text/plain\s+\S+\s+\d+\s+)\S+(\s*$)!$1${textmode}texttops$2!
+ s!^(\s*text/plain\s+\S+\s+\d+\s+)\S+(\s*$)!$1${textmode}texttops$2!;
} "$::prefix/etc/cups/mime.convs";
return 1;
}
@@ -1008,7 +1008,7 @@ sub networkaddress {
my ($address) = @_;
if ($address =~ /\.255$/) {
- while ($address =~ s/\.255$//) {};
+ while ($address =~ s/\.255$//) {}
$address .= ".*";
}
@@ -1295,7 +1295,7 @@ sub read_cups_config {
my @localips = printer::detect::getIPsOfLocalMachine();
@{$printer->{cupsconfig}{root}{AllowFrom}} =
grep {
- !member($_, @localips)
+ !member($_, @localips);
} @{$printer->{cupsconfig}{root}{AllowFrom}};
# Keyword "Deny from"
@@ -1393,7 +1393,7 @@ sub write_cups_config {
"Allow From " .
join("\nAllow From ",
grep {
- !member($_, @localips)
+ !member($_, @localips);
} @{$printer->{cupsconfig}{clientnetworks}}) .
"\n" : "") .
"</Location>\n";
@@ -1410,7 +1410,7 @@ sub write_cups_config {
@{$printer->{cupsconfig}{clientnetworks}}));
} else {
handle_configs::comment_directive($printer->{cupsconfig}{cupsd_conf},
- 'BrowseAddress')
+ 'BrowseAddress');
}
# Set "BrowseAllow" lines
if ($#{$printer->{cupsconfig}{clientnetworks}} >= 0) {
@@ -1469,7 +1469,7 @@ sub read_client_conf() {
sub write_client_conf {
my ($daemonless_cups, $remote_cups_server) = @_;
# Create the directory for client.conf if needed
- (-d "$::prefix/etc/cups/" ) || mkdir("$::prefix/etc/cups/") || return 1;
+ (-d "$::prefix/etc/cups/") || mkdir("$::prefix/etc/cups/") || return 1;
my (@client_conf) = cat_("$::prefix/etc/cups/client.conf");
if ($daemonless_cups) {
handle_configs::set_directive(\@client_conf,
@@ -1836,7 +1836,7 @@ sub poll_ppd_base {
$isrecommended && $isfoomatic &&
(my @foundkeys = grep {
/^$mf\|$model\|/ && !/CUPS/i &&
- $thedb{$_}{driver} eq "PPD"
+ $thedb{$_}{driver} eq "PPD";
} keys %thedb)) {
# Expert mode: "Foomatic + Postscript" driver is
# recommended and there was a PostScript PPD? Make
@@ -1856,7 +1856,7 @@ sub poll_ppd_base {
$isrecommended && $isfoomatic &&
(@foundkeys = grep {
/^$mf\|$model\|.*$sprecstr/ &&
- !/CUPS/i && $thedb{$_}{driver} eq "PPD"
+ !/CUPS/i && $thedb{$_}{driver} eq "PPD";
} keys %thedb)) {
# Expert mode: Foomatic driver other than "Foomatic +
# Postscript" is recommended and there was a PostScript
@@ -1885,7 +1885,7 @@ sub poll_ppd_base {
#my ($devidmake, $devidmodel) = ppd_devid_data($ppd);
#$thedb{$key}{devidmake} = $devidmake;
#$thedb{$key}{devidmodel} = $devidmodel;
- }
+ };
}
close $PPDS;
scalar(keys %thedb) - $driversthere > 5 and last;
@@ -1932,7 +1932,7 @@ sub configure_queue($) {
"-N", $printer->{currentqueue}{desc},
"-L", $printer->{currentqueue}{loc},
@{$printer->{currentqueue}{options}}
- ) or return 0;;
+ ) or return 0;
if ($printer->{currentqueue}{ppd} &&
($printer->{currentqueue}{ppd} ne '1')) {
# Add a comment line containing the path of the used PPD file to the
@@ -2580,7 +2580,7 @@ sub remove_hpoj_config {
my $host = $1;
if ($file =~ /$host/) {
closedir PTALDIR;
- unlink ($file) or return $file;
+ unlink($file) or return $file;
printer::services::restart("hpoj");
return undef;
}
@@ -2590,7 +2590,7 @@ sub remove_hpoj_config {
(grep { /$d->{val}{SERIALNUMBER}/ }
chomp_(cat_($file))))) {
closedir PTALDIR;
- unlink ($file) or return $file;
+ unlink($file) or return $file;
printer::services::restart("hpoj");
return undef;
}
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 076ec9314..33bb7dbb4 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -33,7 +33,7 @@ sub config_cups {
local $::isEmbedded = 0;
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork, 0)) { return 0 };
+ if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }
#$in->set_help('configureRemoteCUPSServer') if $::isInstall;
#- hack to handle cups remote server printing,
@@ -94,8 +94,8 @@ sub config_cups {
},
disabled => sub {
$daemonless_cups ||
- (!$printer->{cupsconfig}{localprintersshared} &&
- !$printer->{cupsconfig}{remotebroadcastsaccepted});
+ !$printer->{cupsconfig}{localprintersshared} &&
+ !$printer->{cupsconfig}{remotebroadcastsaccepted};
} },
{ val => N("Additional CUPS servers: ") .
($#{$browsepoll->{list}} >= 0 ?
@@ -523,7 +523,7 @@ N("Examples for correct IPs:\n") .
type => 'list',
sort => 0,
list => [ N("Off"),
- N("On, Name or IP of remote server:") ]},
+ N("On, Name or IP of remote server:") ] },
{ val => \$rserver,
disabled => sub {
$modechoice ne
@@ -533,7 +533,7 @@ N("Examples for correct IPs:\n") .
)) {
# OK was clicked, update the data
$daemonless_cups =
- ($modechoice eq N("On, Name or IP of remote server:"));
+ $modechoice eq N("On, Name or IP of remote server:");
$remote_cups_server = $rserver;
}
} else {
@@ -550,8 +550,8 @@ N("Examples for correct IPs:\n") .
printer::main::set_jap_textmode($jap_textmode);
# Switch state of daemon-less CUPS mode and write
# client.conf
- if (($daemonless_cups && $printer->{SPOOLER} ne "rcups") ||
- (!$daemonless_cups && $printer->{SPOOLER} eq "rcups")) {
+ if ($daemonless_cups && $printer->{SPOOLER} ne "rcups" ||
+ !$daemonless_cups && $printer->{SPOOLER} eq "rcups") {
my $oldspooler = $printer->{SPOOLER};
$printer->{SPOOLER} = ($daemonless_cups ?
"rcups" : "cups");
@@ -643,8 +643,8 @@ Printers on remote CUPS servers do not need to be configured here; these printer
}
return 0;
}
- }},
- [ { val => \$timeout } ] );
+ } },
+ [ { val => \$timeout } ]);
0;
} },
],
@@ -747,7 +747,7 @@ sub first_time_dialog {
\@choices, $quit);
return 0 if $choice ne $do_it;
- if ($havelocalnetworks && !@autodetected ) {
+ if ($havelocalnetworks && !@autodetected) {
return set_cups_daemon_mode($printer, $in);
} else {
$printer->{SPOOLER} = "cups";
@@ -932,11 +932,11 @@ sub generate_queuename {
my $ml = 12;
if (length($queue) > $ml) {
my %parts;
- $parts{'make'} = $make;
- $parts{'model'} = $model;
+ $parts{make} = $make;
+ $parts{model} = $model;
# Go through the two components, begin with model name, then
# make and then driver
- for my $part (qw/model make/) {
+ foreach my $part (qw(model make)) {
$parts{$part} =~ s/[^a-zA-Z0-9_]/ /g;
# Split the component into words, cutting always at the
@@ -946,39 +946,39 @@ sub generate_queuename {
split(/(?<=[a-zA-Z])(?![a-zA-Z])|(?<=[a-z])(?=[A-Z])/,
$parts{$part});
# Go through all words
- for (@words) {
+ foreach (@words) {
# Do not abbreviate words of less than 3 letters
- next if ($_ !~ /[a-zA-Z]{3,}$/);
+ next if !/[a-zA-Z]{3,}$/;
while (1) {
# Remove the last letter
chop;
# Build the shortened component ...
$parts{$part} = join('', @words);
# ... and the queue name
- $queue = "$parts{'make'} $parts{'model'}";
+ $queue = "$parts{make} $parts{model}";
$queue =~ s/\s+//g;
# Stop if the queue name has 12 characters or
# less, if there is only one letter left, or if
# the manufacturer name is reduced to three
# characters.
last if ((length($queue) <= $ml) ||
- ($_ !~ /[a-zA-Z]{2,}$/) ||
+ (!/[a-zA-Z]{2,}$/) ||
(($part eq 'make') &&
- (length($parts{'make'}) <= 3)));
+ (length($parts{make}) <= 3)));
}
$parts{$part} = join('', @words);
- $queue = "$parts{'make'} $parts{'model'}";
+ $queue = "$parts{make} $parts{model}";
$queue =~ s/\s+//g;
last if (length($queue) <= $ml);
}
last if (length($queue) <= $ml);
}
while ((length($queue) > $ml) &&
- (length($parts{'model'}) > 3)) {
+ (length($parts{model}) > 3)) {
# Queue name too long? Remove last words from model name.
- $parts{'model'} =~
- s/[^a-zA-Z0-9]+[a-zA-Z0-9]*$// || last;
- $queue = "$parts{'make'} $parts{'model'}";
+ last if !($parts{model} =~
+ s/[^a-zA-Z0-9]+[a-zA-Z0-9]*$//);
+ $queue = "$parts{make} $parts{model}";
$queue =~ s/\s+//g;
}
if (length($queue) > $ml) {
@@ -1003,7 +1003,7 @@ sub generate_queuename {
$queue .= $i;
}
last if (!$printer->{configured}{$queue});
- $i ++;
+ $i++;
}
}
@@ -1173,7 +1173,7 @@ Congratulations, your printer is now installed and configured!
You can print using the \"Print\" command of your application (usually in the \"File\" menu).
-If you want to add, remove, or rename a printer, or if you want to change the default option settings (paper input tray, printout quality, ...), select \"Printer\" in the \"Hardware\" section of the %s Control Center.", $shortdistroname))
+If you want to add, remove, or rename a printer, or if you want to change the default option settings (paper input tray, printout quality, ...), select \"Printer\" in the \"Hardware\" section of the %s Control Center.", $shortdistroname));
}
}
@@ -1315,8 +1315,8 @@ sub setup_local_autoscan {
for (my $i = 0; $i <= $#prefixes; $i++) {
my $firstinlist = $first =~ m!^$prefixes[$i]!;
my $secondinlist = $second =~ m!^$prefixes[$i]!;
- if ($firstinlist && !$secondinlist) { return -1 };
- if ($secondinlist && !$firstinlist) { return 1 };
+ if ($firstinlist && !$secondinlist) { return -1 }
+ if ($secondinlist && !$firstinlist) { return 1 }
}
return $first cmp $second;
} keys(%$menuentries);
@@ -1338,7 +1338,7 @@ sub setup_local_autoscan {
}
if ($in) {
# $printer->{expert} or $in->set_help('configurePrinterDev') if $::isInstall;
- if ($#menuentrieslist < 0) { # No menu entry
+ if (@menuentrieslist < 1) { # No menu entry
# auto-detection has failed, we must do all manually
$do_auto_detect = 0;
$printer->{MANUAL} = 1;
@@ -1455,7 +1455,7 @@ sub setup_lpd {
local $::isEmbedded = 0;
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork, 0)) { return 0 };
+ if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }
# $in->set_help('setupLPD') if $::isInstall;
my ($uri, $remotehost, $remotequeue);
@@ -1536,7 +1536,7 @@ sub setup_smb {
local $::isEmbedded = 0;
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork, 0)) { return 0 };
+ if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }
# $in->set_help('setupSMB') if $::isInstall;
my ($uri, $smbuser, $smbpassword, $workgroup, $smbserver, $smbserverip, $smbshare);
@@ -1544,7 +1544,7 @@ sub setup_smb {
if ($printer->{configured}{$queue} &&
$printer->{currentqueue}{connect} =~ m/^smb:/) {
$uri = $printer->{currentqueue}{connect};
- my $parameters = $1 if $uri =~ m!^\s*smb://(.*)$!;
+ my $parameters = $uri =~ m!^\s*smb://(.*)$! && $1;
# Get the user's login and password from the URI
if ($parameters =~ m!([^@]*)@([^@]+)!) {
my $login = $1;
@@ -1638,7 +1638,7 @@ sub setup_smb {
unshift(@menuentrieslist, $menustr);
$menuchoice = $menustr;
}
- if ($#menuentrieslist < 0) {
+ if (@menuentrieslist < 1) {
$autodetect = 0;
} elsif ($menuchoice eq "") {
$menuchoice = $menuentrieslist[0];
@@ -1743,7 +1743,7 @@ sub setup_ncp {
local $::isEmbedded = 0;
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork, 0)) { return 0 };
+ if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }
# $in->set_help('setupNCP') if $::isInstall;
my ($uri, $ncpuser, $ncppassword, $ncpserver, $ncpqueue);
@@ -1818,7 +1818,7 @@ sub setup_socket {
local $::isEmbedded = 0;
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork, 0)) { return 0 };
+ if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }
# $in->set_help('setupSocket') if $::isInstall;
@@ -1895,7 +1895,7 @@ sub setup_socket {
unshift(@menuentrieslist, $menustr);
$menuchoice = $menustr;
}
- if ($#menuentrieslist < 0) {
+ if (@menuentrieslist < 1) {
$autodetect = 0;
} elsif ($menuchoice eq "") {
$menuchoice = $menuentrieslist[0];
@@ -1969,7 +1969,7 @@ sub setup_socket {
"nc") . " " .
N("Aborting"));
return 0;
- }
+ };
}
# Auto-detect printer model
@@ -2185,8 +2185,8 @@ sub setup_common {
$makemodel =~ /^\s*$/) {
local $::isWizard = 0;
if (!$printer->{noninteractive}) {
- if (($device =~ m!/usb/!) &&
- ($printer->{SPOOLER} eq 'cups')) {
+ if ($device =~ m!/usb/! &&
+ $printer->{SPOOLER} eq 'cups') {
my $choice = $in->ask_from_list
(N("Add a new printer"),
N("On many HP printers there are special functions available, maintenance (ink level checking, nozzle cleaning. head alignment, ...) on all not too old inkjets, scanning on multi-function devices, and memory card access on printers with card readers. ") .
@@ -2223,7 +2223,7 @@ sub setup_common {
$hplipinstallfailed = 1;
} else {
$w = $in->wait_message(N("Printerdrake"),
- N("Installing %s package...",N("HPLIP")))
+ N("Installing %s package...", N("HPLIP")))
if !$printer->{noninteractive};
$in->do_pkgs->install('hplip')
or do {
@@ -2255,15 +2255,15 @@ sub setup_common {
undef $w;
$w = $in->wait_message(
N("Printerdrake"),
- N("Checking device and configuring %s...",N("HPLIP")))
+ N("Checking device and configuring %s...", N("HPLIP")))
if !$printer->{noninteractive};
if (!$hplipinstallfailed) {
if ($isHPLIP) {
my @uris = printer::main::start_hplip_manual();
- my @menu; my %menuhash;
- for my $item (@uris) {
- if ($item =~ m!^hp:/(usb|par|net)/(\S*?)(\?\S*|)$!){
+ my (@menu, %menuhash);
+ foreach my $item (@uris) {
+ if ($item =~ m!^hp:/(usb|par|net)/(\S*?)(\?\S*|)$!) {
my $modelname = "HP " . $2;
$modelname =~ s/_/ /g;
push(@menu, $modelname);
@@ -2355,7 +2355,7 @@ sub setup_common {
$hpojinstallfailed = 1;
} else {
$w = $in->wait_message(N("Printerdrake"),
- N("Installing %s package...",N("HPOJ")))
+ N("Installing %s package...", N("HPOJ")))
if !$printer->{noninteractive};
$in->do_pkgs->install('hpoj', 'xojpanel', 'usbutils')
or do {
@@ -2372,7 +2372,7 @@ sub setup_common {
undef $w;
$w = $in->wait_message
(N("Printerdrake"),
- N("Checking device and configuring %s...",N("HPOJ")))
+ N("Checking device and configuring %s...", N("HPOJ")))
if !$printer->{noninteractive};
eval { $ptaldevice = printer::main::configure_hpoj
@@ -2735,7 +2735,7 @@ sub setup_common {
$descr !~ /$guessedmake/i &&
($guessedmake ne "hp" ||
$descr !~ /Hewlett[\s-]+Packard/i))
- { $printer->{DBENTRY} = "" };
+ { $printer->{DBENTRY} = "" }
}
}
@@ -2891,7 +2891,7 @@ sub get_db_entry {
if ($matchstr !~ /$guessedmake/i &&
($guessedmake ne "hp" ||
$matchstr !~ /Hewlett[\s-]+Packard/i))
- { $printer->{DBENTRY} = "" };
+ { $printer->{DBENTRY} = "" }
}
if ($printer->{DBENTRY} eq "") {
# Set the OLD_CHOICE to a non-existing value
@@ -3335,7 +3335,7 @@ sub unhexify {
my $output = "";
my $hexmode = 0;
my $firstdigit = "";
- for (my $i = 0; $i < length($input); $i ++) {
+ for (my $i = 0; $i < length($input); $i++) {
my $c = substr($input, $i, 1);
if ($hexmode) {
if ($c eq ">") {
@@ -4311,15 +4311,15 @@ sub install_spooler {
# Install all packages needed to run printerdrake and the chosen spooler
$packages = $spoolers{$spooler}{packages2add};
- push (@{$packages->[0]}, @{$commonpackages->[0]});
- push (@{$packages->[0]}, @{$localqueuepackages->[0]}) if
+ push @{$packages->[0]}, @{$commonpackages->[0]};
+ push @{$packages->[0]}, @{$localqueuepackages->[0]} if
$spoolers{$spooler}{local_queues};
- push (@{$packages->[1]}, @{$commonpackages->[1]});
- push (@{$packages->[1]}, @{$localqueuepackages->[1]}) if
+ push @{$packages->[1]}, @{$commonpackages->[1]};
+ push @{$packages->[1]}, @{$localqueuepackages->[1]} if
$spoolers{$spooler}{local_queues};
if (files_exist("/usr/bin/gimp") || files_exist("/usr/bin/gimp-2.2")) {
- push (@{$packages->[0]}, @{$gimpprintingpackages->[0]});
- push (@{$packages->[1]}, @{$gimpprintingpackages->[1]});
+ push @{$packages->[0]}, @{$gimpprintingpackages->[0]};
+ push @{$packages->[1]}, @{$gimpprintingpackages->[1]};
}
if (@{$packages->[0]} && !files_exist(@{$packages->[1]})) {
undef $w;
@@ -4396,7 +4396,7 @@ sub assure_remote_server_is_set {
if (!$in->ask_from_
({ title => N("Remote CUPS server and no local CUPS daemon"),
messages => N("In this mode there is no local printing system, all printing requests go directly to the server specified below. Note that it is not possible to define local print queues then and if the specified server is down it cannot be printed at all from this machine.") .
- "\n\n".
+ "\n\n" .
N("Enter the host name or IP of your CUPS server and click OK if you want to use this mode, click \"Quit\" otherwise."),
cancel => N("Quit"),
callbacks => {
@@ -4481,7 +4481,7 @@ sub set_cups_daemon_mode {
type => 'list',
sort => 0,
list => [ N("Local CUPS printing system"),
- N("Remote server, specify Name or IP here:") ]},
+ N("Remote server, specify Name or IP here:") ] },
{ val => \$remote_cups_server,
disabled => sub {
$modechoice ne
@@ -4608,7 +4608,7 @@ sub wizard_close {
undef $::isWizard;
$::WizardWindow->destroy if defined $::WizardWindow;
undef $::WizardWindow;
-};
+}
#- Program entry point for configuration of the printing system.
sub main {
@@ -4760,7 +4760,7 @@ sub mainwindow_interactive {
$cursorpos =
$printer->{configured}{$printer->{DEFAULT}}{queuedata}{menuentry} . N(" (Default)");
} elsif (($printer->{SPOOLER} eq "cups") ||
- ($printer->{SPOOLER} eq "rcups")){
+ ($printer->{SPOOLER} eq "rcups")) {
$cursorpos = find { /!$printer->{DEFAULT}:[^!]*$/ } printer::cups::get_formatted_remote_queues($printer);
}
}
@@ -4843,7 +4843,7 @@ sub mainwindow_interactive {
# Save the cursor position
$cursorpos = $menuchoice;
$menuchoice = '@usermode';
- 1
+ 1;
},
val => ($printer->{expert} ? N("Normal Mode") :
N("Expert Mode")) },
@@ -5035,7 +5035,7 @@ sub add_printer {
goto step_5 if $printer->{expert} || $printer->{MANUAL};
goto step_4 if $printer->{MANUALMODEL};
goto step_3_9;
- }
+ };
}
configure_queue($printer, $in) or die 'wizcancel';
undef $printer->{MANUAL} if $printer->{MANUAL};
@@ -5100,7 +5100,7 @@ sub add_printer {
edit_printer($printer, $in, $upNetwork, $queue);
return 1;
}
- };
+ }
# Delete some variables
cleanup($printer);
@@ -5362,6 +5362,6 @@ sub final_cleanup {
delete($printer->{configured}{$queue}{queuedata}{menuentry});
}
foreach (qw(Old_queue OLD_QUEUE QUEUE TYPE str_type currentqueue DBENTRY ARGS complete OLD_CHOICE NEW MORETHANONE MANUALMODEL AUTODETECT AUTODETECTLOCAL AUTODETECTNETWORK AUTODETECTSMB CONFIGLPD noninteractive expert))
- { delete $printer->{$_} };
+ { delete $printer->{$_} }
}