This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate perl
[perl5.git] / lib / Tie / File / t / 16_handle.t
index b109b48..f799496 100644 (file)
@@ -22,7 +22,7 @@ sysopen F, $file, O_CREAT | O_RDWR
   or die "Couldn't create temp file $file: $!; aborting";
 binmode F;
 
-my $o = tie @a, 'Tie::File', \*F, autochomp => 0;
+my $o = tie @a, 'Tie::File', \*F, autochomp => 0, autodefer => 0;
 print $o ? "ok $N\n" : "not ok $N\n";
 $N++;
 
@@ -56,7 +56,7 @@ check_contents("long0", "longer1", "long2");
 $a[0] = 'longer0';
 check_contents("longer0", "longer1", "long2");
 
-# 25-34 shortening alterations, including truncation
+# 25-38 shortening alterations, including truncation
 $a[0] = 'short0';
 check_contents("short0", "longer1", "long2");
 $a[1] = 'short1';
@@ -78,11 +78,15 @@ close F;
 undef $o;
 untie @a;
 
-# Does it correctly detect a non-seekable handle?
-{  if ($^O =~ /^(MSWin32|dos)$/) {
+# (39) Does it correctly detect a non-seekable handle?
+{  if ($^O =~ /^(MSWin32|dos|beos)$/) {
      print "ok $N # skipped ($^O has broken pipe semantics)\n";
      last;
    }
+   if ($] < 5.006) {
+     print "ok $N # skipped - 5.005_03 panics after this test\n";
+     last;
+   }
    my $pipe_succeeded = eval {pipe *R, *W};
    if ($@) {
      chomp $@;