[inseparable changes from patch from perl5.003_22 to perl5.003_23]
[p5sagit/p5-mst-13.2.git] / ext / IO / lib / IO / File.pm
index e44d77f..0f8df00 100644 (file)
@@ -11,12 +11,12 @@ IO::File - supply object methods for filehandles
     use IO::File;
 
     $fh = new IO::File;
-    if ($fh->open "< file") {
+    if ($fh->open("< file")) {
         print <$fh>;
         $fh->close;
     }
 
-    $fh = new IO::File "> FOO";
+    $fh = new IO::File "> file";
     if (defined $fh) {
         print $fh "bar\n";
         $fh->close;
@@ -31,13 +31,12 @@ IO::File - supply object methods for filehandles
     $fh = new IO::File "file", O_WRONLY|O_APPEND;
     if (defined $fh) {
         print $fh "corge\n";
-        undef $fh;       # automatically closes the file
-    }
 
-    $pos = $fh->getpos;
-    $fh->setpos $pos;
+        $pos = $fh->getpos;
+        $fh->setpos($pos);
 
-    $fh->setvbuf($buffer_var, _IOLBF, 1024);
+        undef $fh;       # automatically closes the file
+    }
 
     autoflush STDOUT 1;