From d5c6c6996a62499f0e5ac098d31bf13b46a4fac1 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 11 Jul 2011 13:10:03 -0700 Subject: [PATCH] Fix a Storable test to work in 5.8.9- MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This test only passes in 5.10.0+ because of a nasty bug in Hash::Util, or perhaps Internals::SvREADONLY. lock_hash is supposed to lock values as well as keys, but it doesn’t always in 5.10.0+, leading me to believe that it was the right func- tion to use. (Fixing that is for another commit.) --- dist/Storable/Storable.pm | 2 +- dist/Storable/t/restrict.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/Storable/Storable.pm b/dist/Storable/Storable.pm index 78ff0b6..a742438 100644 --- a/dist/Storable/Storable.pm +++ b/dist/Storable/Storable.pm @@ -21,7 +21,7 @@ package Storable; @ISA = qw(Exporter); use vars qw($canonical $forgive_me $VERSION); -$VERSION = '2.29'; +$VERSION = '2.30'; BEGIN { if (eval { local $SIG{__DIE__}; require Log::Agent; 1 }) { diff --git a/dist/Storable/t/restrict.t b/dist/Storable/t/restrict.t index a82c13d..65dac6f 100644 --- a/dist/Storable/t/restrict.t +++ b/dist/Storable/t/restrict.t @@ -35,7 +35,7 @@ sub BEGIN { use Storable qw(dclone freeze thaw); -use Hash::Util qw(lock_hash unlock_value); +use Hash::Util qw(lock_hash unlock_value lock_keys); use Test::More tests => 104; my %hash = (question => '?', answer => 42, extra => 'junk', undef => undef); @@ -113,7 +113,7 @@ for $Storable::canonical (0, 1) { my %hv; $hv{a} = __PACKAGE__; - lock_hash %hv; + lock_keys %hv; my $hv2 = &$cloner(\%hv); ok eval { $$hv2{a} = 70 }, 'COWs do not become read-only'; } -- 2.7.4