[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-unattended/var/se3/unattended/install/linuxaux/opt/perl/lib/5.10.0/i586-linux-thread-multi/auto/Storable/ -> _retrieve.al (source)

   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 364 "../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al)"
   7  # Internal retrieve routine
   8  sub _retrieve {
   9      my ($file, $use_locking) = @_;
  10      local *FILE;
  11      open(FILE, $file) || logcroak "can't open $file: $!";
  12      binmode FILE;                            # Archaic systems...
  13      my $self;
  14      my $da = $@;                            # Could be from exception handler
  15      if ($use_locking) {
  16          unless (&CAN_FLOCK) {
  17              logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O";
  18              return undef;
  19          }
  20          flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!";
  21          # Unlocking will happen when FILE is closed
  22      }
  23      eval { $self = pretrieve(*FILE) };        # Call C routine
  24      close(FILE);
  25      logcroak $@ if $@ =~ s/\.?\n$/,/;
  26      $@ = $da;
  27      return $self;
  28  }
  29  
  30  # end of Storable::_retrieve
  31  1;


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1