diff options
author | Raphael Manfredi <Raphael.Manfredi@pobox.com> | 2000-10-23 22:08:56 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-24 13:26:04 +0000 |
commit | b29b780f4ab0c4098dfe60dcb2e227355af1f336 (patch) | |
tree | 266cc9c967ce0d049723b3652039c91ee343ed19 /ext | |
parent | 6b14153558e53fc6fe6e32088f3a22cb391d2206 (diff) | |
download | perl-b29b780f4ab0c4098dfe60dcb2e227355af1f336.tar.gz |
Replace #7409 with
Subject: Re: [PATCH] Re: [ID 20001020.009] Not OK: perl v5.7.0 +DEVEL7368 on dos-djgpp djgp
Message-ID: <20001023200855.A14850@nice.ram.loc>
p4raw-id: //depot/perl@7418
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Storable/Storable.pm | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index aada65eea5..df3e946755 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -26,7 +26,7 @@ package Storable; @ISA = qw(Exporter DynaLoader); use AutoLoader; use vars qw($forgive_me $VERSION); -$VERSION = '1.003'; +$VERSION = '1.004'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... # @@ -41,6 +41,10 @@ unless (defined @Log::Agent::EXPORT) { require Carp; Carp::croak(@_); } + sub logcarp { + require Carp; + Carp::carp(@_); + } }; } @@ -61,6 +65,7 @@ BEGIN { } sub logcroak; +sub logcarp; sub retrieve_fd { &fd_retrieve } # Backward compatibility @@ -119,9 +124,8 @@ sub _store { binmode FILE; # Archaic systems... if ($use_locking) { if ($^O eq 'dos') { - require Carp; - Carp::carp "Storable::lock_store: fcntl/flock emulation broken on $^O\n"; - return undef; + logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O"; + return undef; } flock(FILE, LOCK_EX) || logcroak "can't get exclusive lock on $file: $!"; @@ -239,13 +243,11 @@ sub _retrieve { my $self; my $da = $@; # Could be from exception handler if ($use_locking) { - if ($^O eq 'dos') { - require Carp; - Carp::carp "Storable::lock_retrieve: fcntl/flock emulation broken on $^O\n"; - return undef; - } - flock(FILE, LOCK_SH) || - logcroak "can't get shared lock on $file: $!"; + if ($^O eq 'dos') { + logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O"; + return undef; + } + flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!"; # Unlocking will happen when FILE is closed } eval { $self = pretrieve(*FILE) }; # Call C routine |