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 /Porting/checkcfguse.pl | |
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 'Porting/checkcfguse.pl')
-rwxr-xr-x | Porting/checkcfguse.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Porting/checkcfguse.pl b/Porting/checkcfguse.pl index af3dd12cb1..986d4f9041 100755 --- a/Porting/checkcfguse.pl +++ b/Porting/checkcfguse.pl @@ -47,7 +47,7 @@ my @PAT = print STDERR "$0: Looking for symbols...\n"; for my $pat (@PAT) { for my $fn (map { glob($_) } @{ $pat->[0] }) { - if (open(my $fh, $fn)) { + if (open(my $fh, '<', $fn)) { while (<$fh>) { for my $p (@$pat) { for my $sym (/$p/g) { @@ -70,7 +70,7 @@ delete $SYM{'const'}; my $SYM = join("|", sort { length($b) <=> length($a) || $a cmp $b } keys %SYM); -open(my $mani, "MANIFEST") or die "$0: Failed to open MANIFEST\n"; +open(my $mani, '<', "MANIFEST") or die "$0: Failed to open MANIFEST\n"; my %found; while (<$mani>) { @@ -80,7 +80,7 @@ while (<$mani>) { # from metaconfig generated files that refer to # the config symbols, and from pods. next if $fn =~ m{^(?:config_h.SH|Configure|configure\.com|Porting/(?:config|Glossary)|(?:NetWare|plan9|win32)/(?:config|(?:GNU)?[Mm]akefile)|uconfig)|\.pod$}; - open my $fh, $fn or die qq[$0: Failed to open $fn: $!]; + open my $fh, '<', $fn or die qq[$0: Failed to open $fn: $!]; while (<$fh>) { while (/\b($SYM)\b/go) { $found{$1}{$fn}++; |