X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/22d4bb9ccb8701e68f9243547d7e3a3c55f70908..700dd4f8ecb172f1dd4eff765271d599cfa3fe02:/lib/FileHandle.pm diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm index 5eb3a89..6b3636a 100644 --- a/lib/FileHandle.pm +++ b/lib/FileHandle.pm @@ -1,10 +1,10 @@ package FileHandle; -use 5.005_64; +use 5.006; use strict; our($VERSION, @ISA, @EXPORT, @EXPORT_OK); -$VERSION = "2.00"; +$VERSION = "2.02"; require IO::File; @ISA = qw(IO::File); @@ -111,25 +111,25 @@ FileHandle - supply object methods for filehandles use FileHandle; - $fh = new FileHandle; + $fh = FileHandle->new; if ($fh->open("< file")) { print <$fh>; $fh->close; } - $fh = new FileHandle "> FOO"; + $fh = FileHandle->new("> FOO"); if (defined $fh) { print $fh "bar\n"; $fh->close; } - $fh = new FileHandle "file", "r"; + $fh = FileHandle->new("file", "r"); if (defined $fh) { print <$fh>; undef $fh; # automatically closes the file } - $fh = new FileHandle "file", O_WRONLY|O_APPEND; + $fh = FileHandle->new("file", O_WRONLY|O_APPEND); if (defined $fh) { print $fh "corge\n"; undef $fh; # automatically closes the file @@ -225,7 +225,7 @@ supported C methods: Furthermore, for doing normal I/O you might need these: -=over +=over 4 =item $fh->print