summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-11 13:40:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-11 13:40:09 +0000
commit2db19d156087ccce3037b2bd2da1042280e17904 (patch)
tree0acaff93899445e13d78facbd0aa0da28558a04f /perl-install/printerdrake.pm
parentc1e398be894ecce6394bd76c99b76c022979ac62 (diff)
downloaddrakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar.gz
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar.bz2
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar.xz
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.zip
- do not use "foreach $var (...) {...}" use "foreach my $var (...) {...}" instead
(only pb are functions called in {...} that could use $var, none found except in commands.pm) - various small syntax enhancements to please perl_checker
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 992b61a59..86afe9e24 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -1601,8 +1601,7 @@ sub get_db_entry {
$printer->{DBENTRY} = "";
my $make = uc($printer->{configured}{$queue}{queuedata}{make});
my $model = $printer->{configured}{$queue}{queuedata}{model};
- my $key;
- for $key (keys %printer::thedb) {
+ for my $key (keys %printer::thedb) {
if ((($::expert) && ($key =~ /^$make\|$model\|.*\(recommended\)$/)) ||
((!$::expert) && ($key =~ /^$make\|$model$/))) {
$printer->{DBENTRY} = $key;
@@ -1614,7 +1613,7 @@ sub get_db_entry {
$model =~ s/PS//;
$model =~ s/PostScript//;
$model =~ s/Series//;
- for $key (keys %printer::thedb) {
+ for my $key (keys %printer::thedb) {
if ((($::expert) && ($key =~ /^$make\|$model\|.*\(recommended\)$/)) ||
((!$::expert) && ($key =~ /^$make\|$model$/))) {
$printer->{DBENTRY} = $key;
@@ -1990,8 +1989,7 @@ sub setup_options {
# enumerated option
push(@choicelists, []);
push(@shortchoicelists, []);
- my $choice;
- for $choice (@{$printer->{ARGS}[$i]{vals}}) {
+ for my $choice (@{$printer->{ARGS}[$i]{vals}}) {
push(@{$choicelists[$i]}, $choice->{comment});
push(@{$shortchoicelists[$i]}, $choice->{value});
if ($choice->{value} eq $optshortdefault) {
@@ -2590,7 +2588,7 @@ sub check_network {
[ { val => \$choice, type => 'list',
list => [ N("Configure the network now"),
N("Go on without configuring the network") ]} ] )) {
- if ($choice eq N("Configure the network now")){
+ if ($choice eq N("Configure the network now")) {
if ($::isInstall) {
require network::netconnect;
network::netconnect::main
@@ -3491,9 +3489,8 @@ What do you want to modify on this printer?",
$printer->{DBENTRY} = undef;
#- Which printer type did we have before (check beginning of
#- URI)
- my $type;
if ($printer->{configured}{$queue}) {
- for $type (qw(file lpd socket smb ncp postpipe)) {
+ for my $type (qw(file lpd socket smb ncp postpipe)) {
if ($printer->{currentqueue}{connect}
=~ /^$type:/) {
$printer->{TYPE} =