summaryrefslogtreecommitdiff
path: root/win32/config_sh.PL
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2012-06-07 13:36:37 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2012-06-07 13:36:37 +0100
commit2d7ad1b191c9a33eaa3dbefdbe27eb55c7dbdff3 (patch)
treeec4b98a4605c87e7929da209535b5543c210f7af /win32/config_sh.PL
parent8b02cf248f2584ba87dda62d49ce9d0db9877b8d (diff)
downloadperl-2d7ad1b191c9a33eaa3dbefdbe27eb55c7dbdff3.tar.gz
Use strict and warnings in win32/config_(s)h.PL
Diffstat (limited to 'win32/config_sh.PL')
-rw-r--r--win32/config_sh.PL7
1 files changed, 5 insertions, 2 deletions
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index 7f56025d1d..3fde6ee736 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -1,4 +1,7 @@
+#!perl -w
+use strict;
use FindExt;
+
# take a semicolon separated path list and turn it into a quoted
# list of paths that Text::Parsewords will grok
sub mungepath {
@@ -18,7 +21,7 @@ sub loadopts {
if ($ARGV[0] =~ /--cfgsh-option-file/) {
shift @ARGV;
my $optfile = shift @ARGV;
- local (*F);
+ local (*OPTF);
open OPTF, $optfile or die "Can't open $optfile: $!\n";
my @opts;
chomp(my $line = <OPTF>);
@@ -136,7 +139,7 @@ if ($opt{useithreads} eq 'define' && $opt{ccflags} =~ /-DPERL_IMPLICIT_SYS\b/) {
}
while (<>) {
- s/~([\w_]+)~/$opt{$1}/g;
+ s/~([\w_]+)~/exists $opt{$1} ? $opt{$1} : ''/eg;
if (/^([\w_]+)=(.*)$/) {
my($k,$v) = ($1,$2);
# this depends on cf_time being empty in the template (or we'll