diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-01 15:43:15 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-01 15:43:15 +0000 |
commit | da9af0ea973f0b43730a780a5f8fc28d8f04ef77 (patch) | |
tree | 6ab88c783cdfc3ff411f615ea1ebd27357f83890 /ext/Storable/Storable.pm | |
parent | d482d49446df965fd52eb9d0a3c488e2e530fb16 (diff) | |
download | perl-da9af0ea973f0b43730a780a5f8fc28d8f04ef77.tar.gz |
Upgrade to Storable 1.0.14.
p4raw-id: //depot/perl@13400
Diffstat (limited to 'ext/Storable/Storable.pm')
-rw-r--r-- | ext/Storable/Storable.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index ba8c0f67d6..d72b71d06f 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -1,4 +1,4 @@ -;# $Id: Storable.pm,v 1.0.1.12 2001/08/28 21:51:51 ram Exp $ +;# $Id: Storable.pm,v 1.0.1.13 2001/12/01 13:34:49 ram Exp $ ;# ;# Copyright (c) 1995-2000, Raphael Manfredi ;# @@ -6,6 +6,10 @@ ;# in the README file that comes with the distribution. ;# ;# $Log: Storable.pm,v $ +;# Revision 1.0.1.13 2001/12/01 13:34:49 ram +;# patch14: avoid requiring Fcntl upfront, useful to embedded runtimes +;# patch14: store_fd() will now correctly autoflush file if needed +;# ;# Revision 1.0.1.12 2001/08/28 21:51:51 ram ;# patch13: fixed truncation race with lock_retrieve() in lock_store() ;# @@ -66,7 +70,7 @@ package Storable; @ISA = qw(Exporter DynaLoader); use AutoLoader; use vars qw($forgive_me $VERSION); -$VERSION = '1.013'; +$VERSION = '1.014'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... # @@ -93,8 +97,7 @@ unless (defined @Log::Agent::EXPORT) { # BEGIN { - require Fcntl; - if (exists $Fcntl::EXPORT_TAGS{'flock'}) { + if (eval { require Fcntl; 1 } && exists $Fcntl::EXPORT_TAGS{'flock'}) { Fcntl->import(':flock'); } else { eval q{ @@ -234,6 +237,7 @@ sub _store_fd { # Call C routine nstore or pstore, depending on network order eval { $ret = &$xsptr($file, $self) }; logcroak $@ if $@ =~ s/\.?\n$/,/; + local $\; print $file ''; # Autoflush the file if wanted $@ = $da; return $ret ? $ret : undef; } |