From 1ae6ead94905dfee43773cf3b18949c91b33f9d1 Mon Sep 17 00:00:00 2001 From: John Lightsey Date: Fri, 23 Dec 2016 12:35:45 -0500 Subject: 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 --- configpm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'configpm') 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 () { 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,") && !/^Summary of/; do { $heavy_txt .= $_ } until !defined($_ = ) || /^\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; -- cgit v1.2.1