diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-11-11 13:49:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-11-11 13:49:06 +0000 |
commit | 195f44c2da47b9f0df0461b593935d89619a5a0e (patch) | |
tree | 54fda57efd461170bfb2d33977b1747e27a1b7cd /perl-install/printerdrake.pm | |
parent | 2db19d156087ccce3037b2bd2da1042280e17904 (diff) | |
download | drakx-195f44c2da47b9f0df0461b593935d89619a5a0e.tar drakx-195f44c2da47b9f0df0461b593935d89619a5a0e.tar.gz drakx-195f44c2da47b9f0df0461b593935d89619a5a0e.tar.bz2 drakx-195f44c2da47b9f0df0461b593935d89619a5a0e.tar.xz drakx-195f44c2da47b9f0df0461b593935d89619a5a0e.zip |
- use "foreach" instead of "for" in list context
- use "for" instead of "foreach" when used a la C
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r-- | perl-install/printerdrake.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 86afe9e24..96ee46806 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -141,7 +141,7 @@ sub setup_printer_connection { my ($printer, $in, $upNetwork) = @_; # Choose the appropriate connection config dialog my $done = 1; - for ($printer->{TYPE}) { + foreach ($printer->{TYPE}) { /LOCAL/ and setup_local_autoscan ($printer, $in, $upNetwork) and last; /LPD/ and setup_lpd ($printer, $in, $upNetwork) and last; @@ -1601,7 +1601,7 @@ sub get_db_entry { $printer->{DBENTRY} = ""; my $make = uc($printer->{configured}{$queue}{queuedata}{make}); my $model = $printer->{configured}{$queue}{queuedata}{model}; - for my $key (keys %printer::thedb) { + foreach my $key (keys %printer::thedb) { if ((($::expert) && ($key =~ /^$make\|$model\|.*\(recommended\)$/)) || ((!$::expert) && ($key =~ /^$make\|$model$/))) { $printer->{DBENTRY} = $key; @@ -1613,7 +1613,7 @@ sub get_db_entry { $model =~ s/PS//; $model =~ s/PostScript//; $model =~ s/Series//; - for my $key (keys %printer::thedb) { + foreach my $key (keys %printer::thedb) { if ((($::expert) && ($key =~ /^$make\|$model\|.*\(recommended\)$/)) || ((!$::expert) && ($key =~ /^$make\|$model$/))) { $printer->{DBENTRY} = $key; @@ -1989,7 +1989,7 @@ sub setup_options { # enumerated option push(@choicelists, []); push(@shortchoicelists, []); - for my $choice (@{$printer->{ARGS}[$i]{vals}}) { + foreach my $choice (@{$printer->{ARGS}[$i]{vals}}) { push(@{$choicelists[$i]}, $choice->{comment}); push(@{$shortchoicelists[$i]}, $choice->{value}); if ($choice->{value} eq $optshortdefault) { @@ -3490,7 +3490,7 @@ What do you want to modify on this printer?", #- Which printer type did we have before (check beginning of #- URI) if ($printer->{configured}{$queue}) { - for my $type (qw(file lpd socket smb ncp postpipe)) { + foreach my $type (qw(file lpd socket smb ncp postpipe)) { if ($printer->{currentqueue}{connect} =~ /^$type:/) { $printer->{TYPE} = |