From: Gurusamy Sarathy Date: Tue, 14 Sep 1999 08:35:00 +0000 (+0000) Subject: win32 config tweak (suggested by Greg Chapman ) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=691c0cce63d17f1cd46c50c7861ddd4fb55f308c;p=p5sagit%2Fp5-mst-13.2.git win32 config tweak (suggested by Greg Chapman ) p4raw-id: //depot/perl@4148 --- diff --git a/win32/config_sh.PL b/win32/config_sh.PL index fc0daf0..3edc20b 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -36,12 +36,13 @@ while (<>) { s/~([\w_]+)~/$opt{$1}/g; if (/^([\w_]+)=(.*)$/) { + my($k,$v) = ($1,$2); # this depends on cf_time being empty in the template (or we'll get a loop) - if ($1 eq 'cf_time') { - $_ = "$1='" . localtime(time) . "'\n" if $2 =~ /^\s*'\s*'/; + if ($k eq 'cf_time') { + $_ = "$k='" . localtime(time) . "'\n" if $v =~ /^\s*'\s*'/; } - elsif (exists $opt{$1}) { - $_ = "$1='$opt{$1}'\n"; + elsif (exists $opt{$k}) { + $_ = "$k='$opt{$k}'\n"; } } print;