summaryrefslogtreecommitdiff
path: root/win32/config_h.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_h.PL
parent8b02cf248f2584ba87dda62d49ce9d0db9877b8d (diff)
downloadperl-2d7ad1b191c9a33eaa3dbefdbe27eb55c7dbdff3.tar.gz
Use strict and warnings in win32/config_(s)h.PL
Diffstat (limited to 'win32/config_h.PL')
-rw-r--r--win32/config_h.PL11
1 files changed, 7 insertions, 4 deletions
diff --git a/win32/config_h.PL b/win32/config_h.PL
index dbefeb5acc..3905e33a10 100644
--- a/win32/config_h.PL
+++ b/win32/config_h.PL
@@ -1,14 +1,17 @@
-#
+#!perl -w
+use strict;
+
BEGIN { warn "Running ".__FILE__."\n" };
BEGIN
{
require "Config.pm";
die "Config.pm:$@" if $@;
- Config::->import;
+ Config->import;
}
use File::Compare qw(compare);
use File::Copy qw(copy);
use File::Basename qw(fileparse);
+
my ($name, $dir) = fileparse($0);
$name =~ s#^(.*)\.PL$#../$1.SH#;
my %opt;
@@ -28,7 +31,7 @@ while (<SH>)
{
last if /^\s*sed/;
}
-($term,$file,$pat) = /^\s*sed\s+<<(\S+)\s+>(\S+)\s+(.*)$/;
+my($term,$file,$pat) = /^\s*sed\s+<<(\S+)\s+>(\S+)\s+(.*)$/;
$file =~ s/^\$(\w+)$/$opt{$1}/g;
@@ -106,7 +109,7 @@ sub BackTick
my $cmd = shift;
if ($cmd =~ /^echo\s+(.*?)\s*\|\s+sed\s+'(.*)'\s*$/)
{
- local ($data,$pat) = ($1,$2);
+ my($data,$pat) = ($1,$2);
$data =~ s/\s+/ /g;
eval "\$data =~ $pat";
return $data;