diff options
author | Francois Pons <fpons@mandriva.com> | 2001-08-21 17:53:56 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-08-21 17:53:56 +0000 |
commit | c118acbd84428933c051b7b875adb6b8f81f9377 (patch) | |
tree | b6e68cad91304f4cd0a43d8d27edced794dd5308 /perl-install/printerdrake.pm | |
parent | 42a4c7a03dc9674f998fdd53c3d8188911c29566 (diff) | |
download | drakx-c118acbd84428933c051b7b875adb6b8f81f9377.tar drakx-c118acbd84428933c051b7b875adb6b8f81f9377.tar.gz drakx-c118acbd84428933c051b7b875adb6b8f81f9377.tar.bz2 drakx-c118acbd84428933c051b7b875adb6b8f81f9377.tar.xz drakx-c118acbd84428933c051b7b875adb6b8f81f9377.zip |
slight rewrite of some perl idioms.
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r-- | perl-install/printerdrake.pm | 22 |
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; |