[svk-commit] r2426 - branches/svk-logger/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Sun Jul 8 23:33:24 EDT 2007


Author: clsung
Date: Sun Jul  8 23:33:23 2007
New Revision: 2426

Modified:
   branches/svk-logger/lib/SVK/Logger.pm

Log:
- lc $FH to $fh
- check if defined ($conf_file)

Modified: branches/svk-logger/lib/SVK/Logger.pm
==============================================================================
--- branches/svk-logger/lib/SVK/Logger.pm	(original)
+++ branches/svk-logger/lib/SVK/Logger.pm	Sun Jul  8 23:33:23 2007
@@ -64,12 +64,12 @@
 
     my $conf_file = $ENV{SVKLOGCONFFILE};
     my $conf;
-    if ( -e $conf_file ) {
-	my $FH;
-	open ($FH, $conf_file) or die $!;
+    if ( defined($conf_file) and -e $conf_file ) {
+	my $fh;
+	open $fh, $conf_file or die $!;
 	local $/;
-	$conf = <$FH>;
-	close $FH;
+	$conf = <$fh>;
+	close $fh;
     }
     #warn $conf unless $Log::Log4perl::Logger::INITIALIZED;
     $conf ||= qq{


More information about the svk-commit mailing list