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 /regen/regen_lib.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 'regen/regen_lib.pl')
-rw-r--r-- | regen/regen_lib.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regen/regen_lib.pl b/regen/regen_lib.pl index 184d86b40e..571f5195af 100644 --- a/regen/regen_lib.pl +++ b/regen/regen_lib.pl @@ -48,9 +48,9 @@ sub open_new { if (-f $name) { unlink $name or die "$name exists but can't unlink: $!"; } - open $fh, ">$name" or die "Can't create $name: $!"; + open $fh, '>', $name or die "Can't create $name: $!"; } elsif ($mode eq '>>') { - open $fh, ">>$name" or die "Can't append to $name: $!"; + open $fh, '>>', $name or die "Can't append to $name: $!"; } else { die "Unhandled open mode '$mode'"; } @@ -219,7 +219,7 @@ sub digest { require Digest::SHA; local ($/, *FH); - open FH, "$file" or die "Can't open $file: $!"; + open FH, '<', $file or die "Can't open $file: $!"; my $raw = <FH>; close FH or die "Can't close $file: $!"; return Digest::SHA::sha256_hex($raw); |