From c118acbd84428933c051b7b875adb6b8f81f9377 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 21 Aug 2001 17:53:56 +0000 Subject: slight rewrite of some perl idioms. --- perl-install/printerdrake.pm | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'perl-install/printerdrake.pm') 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; -- cgit v1.2.1