From b29b780f4ab0c4098dfe60dcb2e227355af1f336 Mon Sep 17 00:00:00 2001 From: Raphael Manfredi Date: Mon, 23 Oct 2000 22:08:56 +0200 Subject: 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 --- ext/Storable/Storable.pm | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'ext') 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 -- cgit v1.2.1