Skip to content

Commit

Permalink
Fix a Storable test to work in 5.8.9-
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
Father Chrysostomos committed Jul 11, 2011
1 parent bbd9130 commit d5c6c69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/Storable/Storable.pm
Expand Up @@ -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 }) {
Expand Down
4 changes: 2 additions & 2 deletions dist/Storable/t/restrict.t
Expand Up @@ -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);
Expand Down Expand Up @@ -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';
}
Expand Down

0 comments on commit d5c6c69

Please sign in to comment.