summaryrefslogtreecommitdiff
path: root/NetWare
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 /NetWare
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 'NetWare')
-rw-r--r--NetWare/config_h.PL4
-rw-r--r--NetWare/config_sh.PL4
-rw-r--r--NetWare/t/NWModify.pl2
-rw-r--r--NetWare/t/NWScripts.pl8
4 files changed, 9 insertions, 9 deletions
diff --git a/NetWare/config_h.PL b/NetWare/config_h.PL
index d0eb05a30f..67d5bc3f0b 100644
--- a/NetWare/config_h.PL
+++ b/NetWare/config_h.PL
@@ -19,7 +19,7 @@ $patchlevel =~ s|~VERSION~|$Config{version}|g;
$patchlevel ||= $Config{version};
$patchlevel = qq["$patchlevel"];
-open(SH,"<$name") || die "Cannot open $name:$!";
+open(SH,'<',$name) || die "Cannot open $name:$!";
while (<SH>)
{
last if /^sed/;
@@ -42,7 +42,7 @@ eval $str;
die "$str:$@" if $@;
-open(H,">$file.new") || die "Cannot open $file.new:$!";
+open(H,'>',"$file.new") || die "Cannot open $file.new:$!";
binmode H; # no CRs (which cause a spurious rebuild)
while (<SH>)
{
diff --git a/NetWare/config_sh.PL b/NetWare/config_sh.PL
index 0e1d351c1a..d2daf0ecc1 100644
--- a/NetWare/config_sh.PL
+++ b/NetWare/config_sh.PL
@@ -18,7 +18,7 @@ sub loadopts {
shift @ARGV;
my $optfile = shift @ARGV;
local (*F);
- open OPTF, $optfile or die "Can't open $optfile: $!\n";
+ open OPTF, '<', $optfile or die "Can't open $optfile: $!\n";
my @opts;
chomp(my $line = <OPTF>);
my @vars = split(/\t+~\t+/, $line);
@@ -43,7 +43,7 @@ while (@{$optref} && $optref->[0] =~ /^([\w_]+)=(.*)$/) {
my $pl_h = '../patchlevel.h';
if (-e $pl_h) {
- open PL, "<$pl_h" or die "Can't open $pl_h: $!";
+ open PL, '<', $pl_h or die "Can't open $pl_h: $!";
while (<PL>) {
if (/^#\s*define\s+(PERL_\w+)\s+([\d.]+)/) {
$opt{$1} = $2;
diff --git a/NetWare/t/NWModify.pl b/NetWare/t/NWModify.pl
index 4e9817448d..fa58b47e82 100644
--- a/NetWare/t/NWModify.pl
+++ b/NetWare/t/NWModify.pl
@@ -85,7 +85,7 @@ sub Process_File
# Do the processing only if the file has '.t' extension.
if($ext eq '.t') {
- open(FH, "+< $FileToProcess") or die "Unable to open the file, $FileToProcess for reading and writing.\n";
+ open(FH, '+<', $FileToProcess) or die "Unable to open the file, $FileToProcess for reading and writing.\n";
@ARRAY = <FH>; # Get the contents of the file into an array.
foreach $Line(@ARRAY) # Get each line of the file.
diff --git a/NetWare/t/NWScripts.pl b/NetWare/t/NWScripts.pl
index c16a4a13cd..5f21244fd9 100644
--- a/NetWare/t/NWScripts.pl
+++ b/NetWare/t/NWScripts.pl
@@ -30,7 +30,7 @@ foreach $DirItem(@Dirs)
# Open once in write mode since later files are opened in append mode,
# and if there already exists a file with the same name, all further opens
# will append to that file!!
- open(FHW, "> $IntAutoScript") or die "Unable to open the file, $IntAutoScript for writing.\n";
+ open(FHW, '>', $IntAutoScript) or die "Unable to open the file, $IntAutoScript for writing.\n";
seek(FHW, 0, 0); # seek to the beginning of the file.
close FHW; # close the file.
}
@@ -39,7 +39,7 @@ foreach $DirItem(@Dirs)
print "Generating t/nwauto.pl ...\n\n\n";
-open(FHWA, "> t/nwauto.pl") or die "Unable to open the file, t/nwauto.pl for writing.\n";
+open(FHWA, '>', 't/nwauto.pl') or die "Unable to open the file, t/nwauto.pl for writing.\n";
seek(FHWA, 0, 0); # seek to the beginning of the file.
$version = sprintf("%vd",$^V);
@@ -67,7 +67,7 @@ foreach $FileName(@DirNames)
}
# Write into the intermediary auto script.
- open(FHW, ">> $IntAutoScript") or die "Unable to open the file, $IntAutoScript for appending.\n";
+ open(FHW, '>>', $IntAutoScript) or die "Unable to open the file, $IntAutoScript for appending.\n";
seek(FHW, 0, 2); # seek to the end of the file.
$pos = tell(FHW);
@@ -164,7 +164,7 @@ foreach $DirItem(@Dirs)
$IntAutoScript = "t/".$DirItem.".pl";
# Write into the intermediary auto script.
- open(FHW, ">> $IntAutoScript") or die "Unable to open the file, $IntAutoScript for appending.\n";
+ open(FHW, '>>', $IntAutoScript) or die "Unable to open the file, $IntAutoScript for appending.\n";
seek(FHW, 0, 2); # seek to the end of the file.
# Write into the intermediary auto script.