add IO-1.20; mess with t/lib/io_*.t in an attempt to
[p5sagit/p5-mst-13.2.git] / ext / IO / lib / IO / Seekable.pm
index 3bae914..de982ed 100644 (file)
@@ -19,17 +19,17 @@ be inherited by other C<IO::Handle> based objects. It provides methods
 which allow seeking of the file descriptors.
 
 If the C functions fgetpos() and fsetpos() are available, then
-C<IO::File::getpos> returns an opaque value that represents the
-current position of the IO::File, and C<IO::File::setpos> uses
+C<$io-E<lt>getpos> returns an opaque value that represents the
+current position of the IO::File, and C<$io-E<gt>setpos(POS)> uses
 that value to return to a previously visited position.
 
 See L<perlfunc> for complete descriptions of each of the following
 supported C<IO::Seekable> methods, which are just front ends for the
 corresponding built-in functions:
 
-    clearerr
-    seek
-    tell
+  $io->seek( POS, WHENCE )
+  $io->sysseek( POS, WHENCE )
+  $io->tell
 
 =head1 SEE ALSO
 
@@ -40,7 +40,7 @@ L<IO::File>
 
 =head1 HISTORY
 
-Derived from FileHandle.pm by Graham Barr E<lt>bodg@tiuk.ti.comE<gt>
+Derived from FileHandle.pm by Graham Barr E<lt>gbarr@pobox.comE<gt>
 
 =cut
 
@@ -54,20 +54,20 @@ require Exporter;
 @EXPORT = qw(SEEK_SET SEEK_CUR SEEK_END);
 @ISA = qw(Exporter);
 
-$VERSION = "1.06";
-
-sub clearerr {
-    @_ == 1 or croak 'usage: $fh->clearerr()';
-    seek($_[0], 0, SEEK_CUR);
-}
+$VERSION = "1.08";
 
 sub seek {
-    @_ == 3 or croak 'usage: $fh->seek(POS, WHENCE)';
+    @_ == 3 or croak 'usage: $io->seek(POS, WHENCE)';
     seek($_[0], $_[1], $_[2]);
 }
 
+sub sysseek {
+    @_ == 3 or croak 'usage: $io->sysseek(POS, WHENCE)';
+    sysseek($_[0], $_[1], $_[2]);
+}
+
 sub tell {
-    @_ == 1 or croak 'usage: $fh->tell()';
+    @_ == 1 or croak 'usage: $io->tell()';
     tell($_[0]);
 }