diff options
author | John Lightsey <lightsey@debian.org> | 2016-12-23 12:35:45 -0500 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2016-12-23 13:52:28 -0500 |
commit | 1ae6ead94905dfee43773cf3b18949c91b33f9d1 (patch) | |
tree | 6a54545d46d1ae3f61696e23111a21c736b3b2b5 /plan9 | |
parent | 7527883f8c7b71d808abdbd3cff07f61280a42b5 (diff) | |
download | perl-1ae6ead94905dfee43773cf3b18949c91b33f9d1.tar.gz |
Switch most open() calls to three-argument form.
Switch from two-argument form. Filehandle cloning is still done with the two
argument form for backward compatibility.
Committer: Get all porting tests to pass. Increment some $VERSIONs.
Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl
For: RT #130122
Diffstat (limited to 'plan9')
-rw-r--r-- | plan9/genconfig.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plan9/genconfig.pl b/plan9/genconfig.pl index 623423d7d4..ebd97db018 100644 --- a/plan9/genconfig.pl +++ b/plan9/genconfig.pl @@ -28,7 +28,7 @@ unshift(@INC,'lib'); # In case someone didn't define Perl_Root # before the build if ($ARGV[0] eq '-f') { - open(ARGS,$ARGV[1]) or die "Can't read data from $ARGV[1]: $!\n"; + open(ARGS,'<',$ARGV[1]) or die "Can't read data from $ARGV[1]: $!\n"; @ARGV = (); while (<ARGS>) { push(@ARGV,split(/\|/,$_)); @@ -47,8 +47,8 @@ Can't find config.h to read! EndOfGasp } $outdir = ''; -open(IN,"$infile") || die "Can't open $infile: $!\n"; -open(OUT,">${outdir}config.sh") || die "Can't open ${outdir}config.sh: $!\n"; +open(IN,'<',$infile) || die "Can't open $infile: $!\n"; +open(OUT,'>',"${outdir}config.sh") || die "Can't open ${outdir}config.sh: $!\n"; $time = localtime; $cf_by = $ENV{'user'}; @@ -174,7 +174,7 @@ print OUT "myuname='Plan9 $myname $osvers $p9p_objtype'\n"; # Before we read the C header file, find out what config.sh constants are # equivalent to the C preprocessor macros -if (open(SH,"${outdir}config_h.SH")) { +if (open(SH,'<',"${outdir}config_h.SH")) { while (<SH>) { next unless m%^#(?!if).*\$%; s/^#//; s!(.*?)\s*/\*.*!$1!; @@ -267,7 +267,7 @@ foreach (sort keys %val_vars) { # print OUT "libs='",join(' ',@libs),"'\n"; # print OUT "libc='",join(' ',@crtls),"'\n"; -if (open(PL,"${outdir}patchlevel.h")) { +if (open(PL,'<',"${outdir}patchlevel.h")) { while (<PL>) { if (/^#define PERL_VERSION\s+(\S+)/) { print OUT "PERL_VERSION='$1'\n"; |