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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1262897961-17766-17"
Content-Length: 0
Content-Type: text/html; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 499
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
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; name="storableBug.pl"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="storableBug.pl"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 300
Download storableBug.pl
text/x-perl 300b
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);


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.