Change 34124 by [EMAIL PROTECTED] on 2008/07/11 10:44:51
Bring the joy of strict to the rest of write.t
Affected files ...
... //depot/perl/t/op/write.t#49 edit
Differences ...
==== //depot/perl/t/op/write.t#49 (xtext) ====
Index: perl/t/op/write.t
--- perl/t/op/write.t#48~34123~ 2008-07-11 03:32:00.000000000 -0700
+++ perl/t/op/write.t 2008-07-11 03:44:51.000000000 -0700
@@ -6,6 +6,8 @@
require './test.pl';
}
+use strict; # Amazed that this hackery can be made strict ...
+
# read in a file
sub cat {
my $file = shift;
@@ -72,6 +74,8 @@
## Section 1
############
+use vars qw($fox $multiline $foo $good);
+
format OUT =
the quick brown @<<
$fox
@@ -100,7 +104,7 @@
write(OUT);
close OUT or die "Could not close: $!";
-$right =
+my $right =
"the quick brown fox
jumped
forescore
@@ -195,7 +199,7 @@
# formline tests
-$mustbe = <<EOT;
+$right = <<EOT;
@ a
@> ab
@>> abc
@@ -209,7 +213,8 @@
@>>>>>>>>>> abc
EOT
-$was1 = $was2 = '';
+my $was1 = my $was2 = '';
+use vars '$format2';
for (0..10) {
# lexical picture
$^A = '';
@@ -222,8 +227,8 @@
formline $format2, 'abc';
$was2 .= "$format2 $^A\n";
}
-is $was1, $mustbe;
-is $was2, $mustbe;
+is $was1, $right;
+is $was2, $right;
$^A = '';
@@ -282,6 +287,7 @@
open(OUT10, '>Op_write.tmp') || die "Can't create Op_write.tmp";
+use vars '$test1';
$test1 = 12.95;
write(OUT10);
close OUT10 or die "Could not close: $!";
@@ -493,8 +499,6 @@
## Easiest to add new tests just here
#####################################
-use strict; # Amazed that this hackery can be made strict ...
-
# DAPM. Exercise a couple of error codepaths
{
End of Patch.