In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e654efc25137667e687e787a95f6c53aa0ed69e1?hp=8b02cf248f2584ba87dda62d49ce9d0db9877b8d>

- Log -----------------------------------------------------------------
commit e654efc25137667e687e787a95f6c53aa0ed69e1
Author: Steve Hay <[email protected]>
Date:   Thu Jun 7 14:24:42 2012 +0100

    Remove some commented-out lines from win32/config_h.PL

M       win32/config_h.PL

commit 6f0620367164e0036979de54404eec485a5bbb45
Author: Steve Hay <[email protected]>
Date:   Thu Jun 7 13:39:01 2012 +0100

    Remove some unnecessary apostrophes from win32/config_sh.PL

M       win32/config_sh.PL

commit 2d7ad1b191c9a33eaa3dbefdbe27eb55c7dbdff3
Author: Steve Hay <[email protected]>
Date:   Thu Jun 7 13:36:37 2012 +0100

    Use strict and warnings in win32/config_(s)h.PL

M       win32/config_h.PL
M       win32/config_sh.PL
-----------------------------------------------------------------------

Summary of changes:
 win32/config_h.PL  |   13 +++++++------
 win32/config_sh.PL |   37 ++++++++++++++++++++-----------------
 2 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/win32/config_h.PL b/win32/config_h.PL
index dbefeb5..7ce39d5 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;
 
@@ -48,7 +51,6 @@ eval $str;
 die "$str:$@" if $@;
 
 open(H,">$file.new") || die "Cannot open $file.new:$!";
-#binmode H;            # no CRs (which cause a spurious rebuild)
 while (<SH>)
  {
   last if /^$term$/o;
@@ -83,7 +85,6 @@ if (compare("$file.new",$file))
   chmod(0666,$file);
   unlink($file);
   rename("$file.new",$file);
-  #chmod(0444,$file);
   exit(1);
  }
 else
@@ -106,7 +107,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;
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index 7f56025..4d83369 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>);
@@ -45,13 +48,13 @@ while (@{$optref} && $optref->[0] =~ /^([\w_]+)=(.*)$/) {
 FindExt::scan_ext("../cpan");
 FindExt::scan_ext("../dist");
 FindExt::scan_ext("../ext");
-FindExt::set_static_extensions(split ' ', $opt{'static_ext'});
+FindExt::set_static_extensions(split ' ', $opt{static_ext});
 
-$opt{'nonxs_ext'}        = join(' ',FindExt::nonxs_ext()) || ' ';
-$opt{'static_ext'}       = join(' ',FindExt::static_ext()) || ' ';
-$opt{'dynamic_ext'}      = join(' ',FindExt::dynamic_ext()) || ' ';
-$opt{'extensions'}       = join(' ',FindExt::extensions()) || ' ';
-$opt{'known_extensions'} = join(' ',FindExt::known_extensions()) || ' ';
+$opt{nonxs_ext}        = join(' ',FindExt::nonxs_ext()) || ' ';
+$opt{static_ext}       = join(' ',FindExt::static_ext()) || ' ';
+$opt{dynamic_ext}      = join(' ',FindExt::dynamic_ext()) || ' ';
+$opt{extensions}       = join(' ',FindExt::extensions()) || ' ';
+$opt{known_extensions} = join(' ',FindExt::known_extensions()) || ' ';
 
 my $pl_h = '../patchlevel.h';
 
@@ -76,16 +79,16 @@ if (-e $patch_file) {
     close $fh;
 }
 
-$opt{'version'} = 
"$opt{PERL_REVISION}.$opt{PERL_VERSION}.$opt{PERL_SUBVERSION}";
-$opt{'version_patchlevel_string'} = "version $opt{PERL_VERSION} subversion 
$opt{PERL_SUBVERSION}";
-$opt{'version_patchlevel_string'} .= " patch $opt{PERL_PATCHLEVEL}" if exists 
$opt{PERL_PATCHLEVEL};
+$opt{version} = "$opt{PERL_REVISION}.$opt{PERL_VERSION}.$opt{PERL_SUBVERSION}";
+$opt{version_patchlevel_string} = "version $opt{PERL_VERSION} subversion 
$opt{PERL_SUBVERSION}";
+$opt{version_patchlevel_string} .= " patch $opt{PERL_PATCHLEVEL}" if exists 
$opt{PERL_PATCHLEVEL};
 
 my $ver = `ver 2>nul`;
 if ($ver =~ /Version (\d+\.\d+)/) {
-    $opt{'osvers'} = $1;
+    $opt{osvers} = $1;
 }
 else {
-    $opt{'osvers'} = '4.0';
+    $opt{osvers} = '4.0';
 }
 
 if (exists $opt{cc}) {
@@ -99,10 +102,10 @@ if (exists $opt{cc}) {
     }
 }
 
-$opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'};
-$opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0]
-       unless $opt{'cf_email'};
-$opt{'usemymalloc'} = 'y' if $opt{'d_mymalloc'} eq 'define';
+$opt{cf_by} = $ENV{USERNAME} unless $opt{cf_by};
+$opt{cf_email} = $opt{cf_by} . '@' . (gethostbyname('localhost'))[0]
+       unless $opt{cf_email};
+$opt{usemymalloc} = 'y' if $opt{d_mymalloc} eq 'define';
 
 $opt{libpth} = mungepath($opt{libpth}) if exists $opt{libpth};
 $opt{incpath} = mungepath($opt{incpath}) if exists $opt{incpath};
@@ -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

--
Perl5 Master Repository

Reply via email to