summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-08-21 17:53:56 +0000
committerFrancois Pons <fpons@mandriva.com>2001-08-21 17:53:56 +0000
commitc118acbd84428933c051b7b875adb6b8f81f9377 (patch)
treeb6e68cad91304f4cd0a43d8d27edced794dd5308 /perl-install
parent42a4c7a03dc9674f998fdd53c3d8188911c29566 (diff)
downloaddrakx-backup-do-not-use-c118acbd84428933c051b7b875adb6b8f81f9377.tar
drakx-backup-do-not-use-c118acbd84428933c051b7b875adb6b8f81f9377.tar.gz
drakx-backup-do-not-use-c118acbd84428933c051b7b875adb6b8f81f9377.tar.bz2
drakx-backup-do-not-use-c118acbd84428933c051b7b875adb6b8f81f9377.tar.xz
drakx-backup-do-not-use-c118acbd84428933c051b7b875adb6b8f81f9377.zip
slight rewrite of some perl idioms.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printerdrake.pm22
1 files changed, 10 insertions, 12 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 6cbb768fa..99c8e04dc 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -1244,7 +1244,7 @@ sub main {
}
# only experts should be asked for the spooler
- !$::expert && ($printer->{SPOOLER} ||= 'cups');
+ !$::expert and $printer->{SPOOLER} ||= 'cups';
# If we have chosen a spooler, install it.
if (($printer->{SPOOLER}) && ($printer->{SPOOLER} ne '')) {
@@ -1253,8 +1253,7 @@ sub main {
}
# Control variables for the main loop
- my ($queue, $continue, $newqueue, $editqueue, $expertswitch) =
- ('', 1, 0, 0, 0);
+ my ($queue, $continue, $newqueue, $editqueue, $expertswitch) = ('', 1, 0, 0, 0);
# Cursor position in queue modification window
my $modify = _("Printer options");
while ($continue) {
@@ -1355,15 +1354,14 @@ sub main {
#- Set default values for a new queue
$printer::printer_type_inv{$printer->{TYPE}} or
$printer->{TYPE} = printer::default_printer_type($printer);
- $printer->{currentqueue} = {};
- $printer->{currentqueue}{'queue'} = $queue;
- $printer->{currentqueue}{'foomatic'} = 0;
- $printer->{currentqueue}{'desc'} = "";
- $printer->{currentqueue}{'loc'} = "";
- $printer->{currentqueue}{'make'} = "";
- $printer->{currentqueue}{'model'} = "";
- $printer->{currentqueue}{'spooler'} =
- $printer->{SPOOLER};
+ $printer->{currentqueue} = { queue => $queue,
+ foomatic => 0,
+ desc => "",
+ loc => "",
+ make => "",
+ model => "",
+ spooler => $printer->{SPOOLER},
+ };
#- Set OLD_QUEUE field so that the subroutines for the
#- configuration work correctly.
$printer->{OLD_QUEUE} = $printer->{QUEUE} = $queue;