home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / apache / files / ActivePerl-5.6.1.638-MSWin32-x86.msi / _fad4a53608f52152aac172420fa8de7c < prev    next >
Encoding:
Text File  |  2004-04-13  |  695 b   |  26 lines

  1. # NOTE: Derived from blib\lib\Storable.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Storable;
  5.  
  6. #line 312 "blib\lib\Storable.pm (autosplit into blib\lib\auto\Storable\fd_retrieve.al)"
  7. #
  8. # fd_retrieve
  9. #
  10. # Same as retrieve, but perform from an already opened file descriptor instead.
  11. #
  12. sub fd_retrieve {
  13.     my ($file) = @_;
  14.     my $fd = fileno($file);
  15.     logcroak "not a valid file descriptor" unless defined $fd;
  16.     my $self;
  17.     my $da = $@;                            # Could be from exception handler
  18.     eval { $self = pretrieve($file) };        # Call C routine
  19.     logcroak $@ if $@ =~ s/\.?\n$/,/;
  20.     $@ = $da;
  21.     return $self;
  22. }
  23.  
  24. # end of Storable::fd_retrieve
  25. 1;
  26.