Subject: | Restricted hash keys not being cloned correctly |
For some reason restricted hash keys aren't being cloned correctly when using the specified set of keys.
attached is a script that that generates the restricted hash error. I've tried running this on both perl 5.8.9 and perl 5.10.0 and they both generate the restricted hash error.
using Devel::Peek it appears that all the hash keys are in the string generated by freeze, so I'm thinking that it's something in the thaw process that is not retrieving them correctly.
attached is a script that that generates the restricted hash error. I've tried running this on both perl 5.8.9 and perl 5.10.0 and they both generate the restricted hash error.
using Devel::Peek it appears that all the hash keys are in the string generated by freeze, so I'm thinking that it's something in the thaw process that is not retrieving them correctly.
Subject: | storableBug.pl |
use Hash::Util qw{lock_keys};
use Storable qw{dclone};
my @keys = qw{
ORIGINALIMAGE
IMAGESVERSION
CACHEKEY
DIRTY
CHANGED
IMAGES
SYSTEM
USER
};
my $hash1 = {};
lock_keys(%$hash1, @keys);
my $hash2 = dclone($hash1);
$hash1->{$_} = 'test' foreach(@keys);
$hash2->{$_} = 'test' foreach(@keys);