X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FStorable%2FStorable.pm;h=1ac12e189d6edf3ab305be719a348acd9c4ff734;hb=530b72baaecf6b4faf758663fc0fded0f4426004;hp=2f352f30b766aa0964f14a5f8f30f823cacb54ef;hpb=cfb19460d5da371c484e59535e4cf856129e852c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index 2f352f3..1ac12e1 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -79,18 +79,7 @@ $VERSION = '1.015'; eval "use Log::Agent"; -unless (defined @Log::Agent::EXPORT) { - eval q{ - sub logcroak { - require Carp; - Carp::croak(@_); - } - sub logcarp { - require Carp; - Carp::carp(@_); - } - }; -} +require Carp; # # They might miss :flock in Fcntl @@ -107,22 +96,33 @@ BEGIN { } } -sub logcroak; -sub logcarp; - # Can't Autoload cleanly as this clashes 8.3 with &retrieve sub retrieve_fd { &fd_retrieve } # Backward compatibility +# By default restricted hashes are downgraded on earlier perls. + +$Storable::downgrade_restricted = 1; bootstrap Storable; 1; __END__ +# +# Use of Log::Agent is optional. If it hasn't imported these subs then +# Autoloader will kindly supply our fallback implementation. +# + +sub logcroak { + Carp::croak(@_); +} + +sub logcarp { + Carp::carp(@_); +} # # Determine whether locking is possible, but only when needed. # -sub CAN_FLOCK { - my $CAN_FLOCK if 0; +sub CAN_FLOCK; my $CAN_FLOCK; sub CAN_FLOCK { return $CAN_FLOCK if defined $CAN_FLOCK; require Config; import Config; return $CAN_FLOCK =