From: Matt S Trout Date: Sat, 16 Jul 2011 20:18:03 +0000 (+0000) Subject: process SCS_PAGES_DIR etc. env vars equivalently to --pages_dir config option X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f82adbe11fa69f94830dff3accc33472e0de8f93;p=scpubgit%2FSCS.git process SCS_PAGES_DIR etc. env vars equivalently to --pages_dir config option --- diff --git a/lib/SCSite.pm b/lib/SCSite.pm index e1fa5cb..a6b1abf 100755 --- a/lib/SCSite.pm +++ b/lib/SCSite.pm @@ -158,7 +158,7 @@ sub run_if_script { my $class = shift; my @config_keys = keys %{{$class->default_config}}; require Getopt::Long; - my %config; + my %config = map +($_ => $ENV{"SCS_${\uc $_}"}), @config_keys; Getopt::Long::GetOptions( map +("$_=s" => \$config{$_}), @config_keys );