Commit | Line | Data |
---|---|---|
920dae64 AT |
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 243 "../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_store_fd.al)" | |
7 | # Internal store routine on opened file descriptor | |
8 | sub _store_fd { | |
9 | my $xsptr = shift; | |
10 | my $self = shift; | |
11 | my ($file) = @_; | |
12 | logcroak "not a reference" unless ref($self); | |
13 | logcroak "too many arguments" unless @_ == 1; # No @foo in arglist | |
14 | my $fd = fileno($file); | |
15 | logcroak "not a valid file descriptor" unless defined $fd; | |
16 | my $da = $@; # Don't mess if called from exception handler | |
17 | my $ret; | |
18 | # Call C routine nstore or pstore, depending on network order | |
19 | eval { $ret = &$xsptr($file, $self) }; | |
20 | logcroak $@ if $@ =~ s/\.?\n$/,/; | |
21 | local $\; print $file ''; # Autoflush the file if wanted | |
22 | $@ = $da; | |
23 | return $ret ? $ret : undef; | |
24 | } | |
25 | ||
26 | # end of Storable::_store_fd | |
27 | 1; |