diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-18 21:41:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-18 21:41:07 +0000 |
commit | 0976d0441bee25d06260dad7b520173063e194ec (patch) | |
tree | 133061d9d342351265be9744522f91d5b5648e70 /perl-install/printer.pm | |
parent | a3f0d48ce9bec90c2304166b1185ddb457a9775a (diff) | |
download | drakx-backup-do-not-use-0976d0441bee25d06260dad7b520173063e194ec.tar drakx-backup-do-not-use-0976d0441bee25d06260dad7b520173063e194ec.tar.gz drakx-backup-do-not-use-0976d0441bee25d06260dad7b520173063e194ec.tar.bz2 drakx-backup-do-not-use-0976d0441bee25d06260dad7b520173063e194ec.tar.xz drakx-backup-do-not-use-0976d0441bee25d06260dad7b520173063e194ec.zip |
no_comment
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r-- | perl-install/printer.pm | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 2724b6988..5d3d9bb63 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -266,9 +266,7 @@ $spooldir = "/var/spool/lpd"; #-##################################################################################### -sub set_prefix($) { - ($prefix) = @_; -} +sub set_prefix($) { $prefix = $_[0]; } #-***************************************************************************** #- read function #-***************************************************************************** @@ -276,19 +274,17 @@ sub set_prefix($) { #- Read the printer database from dbpath into memory #------------------------------------------------------------------------------ sub read_printer_db(;$) { - my ($dbpath) = @_; - - $dbpath = $prefix . ($dbpath || $PRINTER_DB_FILE); + my $dbpath = $prefix . ($_[0] || $PRINTER_DB_FILE); %thedb and return; local *DBPATH; #-don't have to do close - open DBPATH, "<$dbpath" or die "An error has occurred on $dbpath : $!"; + open DBPATH, $dbpath or die "An error has occurred on $dbpath : $!"; while (<DBPATH>) { if (/^StartEntry:\s(\w*)/) { my $entryname = $1; - my $entry = {}; + my $entry; $entry->{ENTRY} = $entryname; @@ -363,7 +359,7 @@ sub create_config_file($$%) { #-TODO my $oldmask = umask 0755; - open IN , "<$in" or die "Can't open $in $!"; + open IN , $in or die "Can't open $in $!"; if ($::testing) { *OUT = *STDOUT } else { @@ -396,7 +392,7 @@ sub copy_master_filter($) { #- given a PrintCap Entry, create the spool dir and special #- rhs-printfilters related config files which are required #------------------------------------------------------------------------------ -my $intro_printcap_test=" +my $intro_printcap_test = " # # Please don't edit this file directly unless you know what you are doing! # Look at the printcap(5) man page for more info. |