1 # NOTE: Derived from blib/lib/Storable.pm.
2 # Changes made here will be lost when autosplit is run again.
6 #line 364 "blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/_retrieve.al)"
7 # Internal retrieve routine
9 my ($file, $use_locking) = @_;
11 open(FILE, $file) || logcroak "can't open $file: $!";
12 binmode FILE; # Archaic systems...
14 my $da = $@; # Could be from exception handler
17 logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O";
20 flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!";
21 # Unlocking will happen when FILE is closed
23 eval { $self = pretrieve(*FILE) }; # Call C routine
25 logcroak $@ if $@ =~ s/\.?\n$/,/;
30 # end of Storable::_retrieve