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 --- installhtml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'installhtml') diff --git a/installhtml b/installhtml index 06342a8425..0199709bb4 100644 --- a/installhtml +++ b/installhtml @@ -233,7 +233,7 @@ foreach my $dir (@splithead) { # read in everything until what would have been the first =head # directive, patching the index as we go. - open(H, "<$file.html") || + open(H, '<', "$file.html") || die "$0: error opening $file.html for input: $!\n"; $/ = ""; my @data = (); @@ -250,7 +250,7 @@ foreach my $dir (@splithead) { close(H); # now rewrite the file - open(H, ">$file.html") || + open(H, '>', "$file.html") || die "$0: error opening $file.html for output: $!\n"; print H "@data", "\n"; close(H); @@ -298,7 +298,7 @@ sub create_index { my @files = sort(grep(/\.html?$/, readdir(DIR))); closedir(DIR); - open(HTML, ">$html") || + open(HTML, '>', $html) || die "$0: error opening $html for output: $!\n"; # for each .html file in the directory, extract the index @@ -307,7 +307,7 @@ sub create_index { foreach my $file (@files) { my $filedata = do { - open(my $in, "<$dir/$file") || + open(my $in, '<', "$dir/$file") || die "$0: error opening $dir/$file for input: $!\n"; local $/ = undef; <$in>; @@ -406,7 +406,7 @@ sub splitpod { # read the file in paragraphs $/ = ""; - open(SPLITIN, "<$pod") || + open(SPLITIN, '<', $pod) || die "$0: error opening $pod for input: $!\n"; @filedata = ; close(SPLITIN) || @@ -462,7 +462,7 @@ sub splitpod { # create the new .pod file print "\tcreating $poddir/$file\n" if $verbose; - open(SPLITOUT, ">$poddir/$file") || + open(SPLITOUT, '>', "$poddir/$file") || die "$0: error opening $poddir/$file for output: $!\n"; $poddata[$i] =~ s,L<([^<>]*)>, defined $heads{anchorify($1)} ? "L<$dir/$1>" : "L<$1>" -- cgit v1.2.1