home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / perl / 5.8.8 / IO / Seekable.pm < prev    next >
Encoding:
Perl POD Document  |  2006-07-07  |  686 b   |  37 lines

  1. #
  2.  
  3. package IO::Seekable;
  4.  
  5. use 5.006_001;
  6. use Carp;
  7. use strict;
  8. our($VERSION, @EXPORT, @ISA);
  9. use IO::Handle ();
  10. # XXX we can't get these from IO::Handle or we'll get prototype
  11. # mismatch warnings on C<use POSIX; use IO::File;> :-(
  12. use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END);
  13. require Exporter;
  14.  
  15. @EXPORT = qw(SEEK_SET SEEK_CUR SEEK_END);
  16. @ISA = qw(Exporter);
  17.  
  18. $VERSION = "1.10";
  19. $VERSION = eval $VERSION;
  20.  
  21. sub seek {
  22.     @_ == 3 or croak 'usage: $io->seek(POS, WHENCE)';
  23.     seek($_[0], $_[1], $_[2]);
  24. }
  25.  
  26. sub sysseek {
  27.     @_ == 3 or croak 'usage: $io->sysseek(POS, WHENCE)';
  28.     sysseek($_[0], $_[1], $_[2]);
  29. }
  30.  
  31. sub tell {
  32.     @_ == 1 or croak 'usage: $io->tell()';
  33.     tell($_[0]);
  34. }
  35.  
  36. 1;
  37.