[Bps-public-commit] r13323 - in Shipwright/trunk: lib

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Jun 16 11:09:50 EDT 2008


Author: sunnavy
Date: Mon Jun 16 11:09:42 2008
New Revision: 13323

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright.pm

Log:
 r13445 at sunnavys-mb:  sunnavy | 2008-06-16 22:08:15 +0800
 change %args directly, since we need %args later


Modified: Shipwright/trunk/lib/Shipwright.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright.pm	(original)
+++ Shipwright/trunk/lib/Shipwright.pm	Mon Jun 16 11:09:42 2008
@@ -20,20 +20,19 @@
     my $class = shift;
 
     my %args = @_;
+    $args{log_level} = uc $args{log_level} || 'FATAL';
 
-    my $log_file = $args{log_file};
-
-    unless ($log_file) {
+    unless ($args{log_file}) {
         # a better named log_file, in the name of repository
         require File::Spec;
         my $info = join '', map { /\w/ ? $_ : '_' } split //, $args{repository};
-        $log_file =
+        $args{log_file} =
           File::Spec->catfile( File::Spec->tmpdir, "shipwright_${info}.log" );
     }
 
     my $self = {
-        log_level => uc $args{log_level} || 'FATAL',
-        log_file  => $log_file,
+        log_level => $args{log_level},
+        log_file  => $args{log_file},
     };
     
     bless $self, $class;



More information about the Bps-public-commit mailing list