| 1 | # NOTE: Derived from ../../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 338 "../../lib/Storable.pm (autosplit into ../../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; |