Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Storable CPAN distribution.

Report information
The Basics
Id: 53495
Status: new
Priority: 0/
Queue: Storable

People
Owner: Nobody in particular
Requestors: daniel.frett [...] ccci.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 2.18
  • 2.20
  • 2.21
Fixed in: (no value)



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.
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);