summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorJohn Lightsey <lightsey@debian.org>2016-12-23 12:35:45 -0500
committerJames E Keenan <jkeenan@cpan.org>2016-12-23 13:52:28 -0500
commit1ae6ead94905dfee43773cf3b18949c91b33f9d1 (patch)
tree6a54545d46d1ae3f61696e23111a21c736b3b2b5 /configpm
parent7527883f8c7b71d808abdbd3cff07f61280a42b5 (diff)
downloadperl-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 'configpm')
-rwxr-xr-xconfigpm10
1 files changed, 5 insertions, 5 deletions
diff --git a/configpm b/configpm
index d2ba35cec3..877bff1f30 100755
--- a/configpm
+++ b/configpm
@@ -216,7 +216,7 @@ my $quote;
my %seen_quotes;
{
my ($name, $val);
- open(CONFIG_SH, $Config_SH) || die "Can't open $Config_SH: $!";
+ open(CONFIG_SH, '<', $Config_SH) || die "Can't open $Config_SH: $!";
while (<CONFIG_SH>) {
next if m:^#!/bin/sh:;
@@ -527,7 +527,7 @@ $heavy_txt .= join('', @non_v) . "\n";
# copy config summary format from the myconfig.SH script
$heavy_txt .= "our \$summary = <<'!END!';\n";
-open(MYCONFIG,"<myconfig.SH") || die "open myconfig.SH failed: $!";
+open(MYCONFIG,'<','myconfig.SH') || die "open myconfig.SH failed: $!";
1 while defined($_ = <MYCONFIG>) && !/^Summary of/;
do { $heavy_txt .= $_ } until !defined($_ = <MYCONFIG>) || /^\s*$/;
close(MYCONFIG);
@@ -632,7 +632,7 @@ foreach my $prefix (qw(libs libswanted)) {
$heavy_txt .= "${prefix}_nolargefiles='$value'\n";
}
-if (open(my $fh, "cflags")) {
+if (open(my $fh, '<', 'cflags')) {
my $ccwarnflags;
my $ccstdflags;
while (<$fh>) {
@@ -838,7 +838,7 @@ tie %%Config, 'Config', {
ENDOFTIE
-open(CONFIG_POD, ">$Config_POD") or die "Can't open $Config_POD: $!";
+open(CONFIG_POD, '>', $Config_POD) or die "Can't open $Config_POD: $!";
print CONFIG_POD <<'ENDOFTAIL';
=head1 NAME
@@ -991,7 +991,7 @@ in such cases.
ENDOFTAIL
if ($Opts{glossary}) {
- open(GLOS, "<$Glossary") or die "Can't open $Glossary: $!";
+ open(GLOS, '<', $Glossary) or die "Can't open $Glossary: $!";
}
my %seen = ();
my $text = 0;