summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-05 07:51:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-05 07:51:02 +0000
commit9661b71b22ea7b41b2383b0b620caf48f09c161f (patch)
treea56ae9cd9adccdc673ae15bbced78a44f3b0ad50 /perl-install
parentb3002e9b94919544e460e17c9582219a8692fffe (diff)
downloaddrakx-9661b71b22ea7b41b2383b0b620caf48f09c161f.tar
drakx-9661b71b22ea7b41b2383b0b620caf48f09c161f.tar.gz
drakx-9661b71b22ea7b41b2383b0b620caf48f09c161f.tar.bz2
drakx-9661b71b22ea7b41b2383b0b620caf48f09c161f.tar.xz
drakx-9661b71b22ea7b41b2383b0b620caf48f09c161f.zip
use $LOG instead of *LOG
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/log.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/perl-install/log.pm b/perl-install/log.pm
index 3f281b5c6..e14454b03 100644
--- a/perl-install/log.pm
+++ b/perl-install/log.pm
@@ -2,10 +2,10 @@ package log; # $Id$
use diagnostics;
use strict;
-use vars qw(*LOG *LOG2);
use c;
+my ($LOG, $LOG2);
#-#####################################################################################
#- Globals
@@ -16,7 +16,7 @@ my $logDebugMessages = 0;
#-######################################################################################
#- Functions
#-######################################################################################
-sub F() { *LOG }
+sub F() { $LOG }
sub l {
$logOpen or openLog();
@@ -25,8 +25,8 @@ sub l {
} elsif ($::isStandalone) {
c::syslog(c::LOG_WARNING(), join("", @_));
} elsif ($::isInstall) {
- print LOG "* ", @_, "\n";
- print LOG2 "* ", @_, "\n";
+ print $LOG "* ", @_, "\n";
+ print $LOG2 "* ", @_, "\n";
} else {
print STDERR @_, "\n";
}
@@ -37,13 +37,13 @@ sub w { &l }
sub openLog(;$) {
if ($::isInstall) {
if ($_[0]) { #- useLocal
- open LOG, "> $_[0]"; #-#
+ open $LOG, "> $_[0]"; #-#
} else {
- open LOG, "> /dev/tty3"; #-#
+ open $LOG, "> /dev/tty3"; #-#
}
- open LOG2, ">> /tmp/ddebug.log"; #-#
- select((select(LOG), $| = 1)[0]);
- select((select(LOG2), $| = 1)[0]);
+ open $LOG2, ">> /tmp/ddebug.log"; #-#
+ select((select($LOG), $| = 1)[0]);
+ select((select($LOG2), $| = 1)[0]);
}
exists $ENV{DEBUG} and $logDebugMessages = 1;
$logOpen = 1;
@@ -52,7 +52,7 @@ sub openLog(;$) {
sub closeLog() {
if ($::isStandalone) {
c::closelog();
- } else { close LOG; close LOG2 }
+ } else { close $LOG; close $LOG2 }
}
sub explanations { c::syslog(c::LOG_INFO()|c::LOG_LOCAL1(), "@_") }