[Bps-public-commit] r16564 - sd/trunk/lib/App/SD

ruz at bestpractical.com ruz at bestpractical.com
Tue Oct 28 12:33:16 EDT 2008


Author: ruz
Date: Tue Oct 28 12:33:15 2008
New Revision: 16564

Modified:
   sd/trunk/lib/App/SD/Config.pm

Log:
* don't assign undef in %ENV

Modified: sd/trunk/lib/App/SD/Config.pm
==============================================================================
--- sd/trunk/lib/App/SD/Config.pm	(original)
+++ sd/trunk/lib/App/SD/Config.pm	Tue Oct 28 12:33:15 2008
@@ -15,7 +15,8 @@
     #   $ENV{SD_CONFIG} > fs_root/sdrc > fs_root/prophetrc (for backcompat)
     #   $HOME/.sdrc > $ENV{PROPHET_APP_CONFIG} > $HOME/.prophetrc
 
-    $ENV{'PROPHET_APP_CONFIG'} = $self->file_if_exists($ENV{'SD_CONFIG'})
+    $ENV{'PROPHET_APP_CONFIG'}
+            =  $self->file_if_exists($ENV{'SD_CONFIG'})
             || $self->file_if_exists(
                 File::Spec->catfile($self->app_handle->handle->fs_root => 'sdrc'))
             || $self->file_if_exists(
@@ -23,7 +24,8 @@
                 File::Spec->catfile($self->app_handle->handle->fs_root => 'prophetrc'))
             || $self->file_if_exists(
                 File::Spec->catfile($ENV{'HOME'}.'/.sdrc'))
-            || $ENV{'PROPHET_APP_CONFIG'}; # don't overwrite with nothing
+            || $ENV{'PROPHET_APP_CONFIG'} # don't overwrite with nothing
+            || ''; # don't write undef
 };
 
 __PACKAGE__->meta->make_immutable;



More information about the Bps-public-commit mailing list