Skip Menu |

This queue is for tickets about the Clone-Fast CPAN distribution.

Report information
The Basics
Id: 32567
Status: new
Priority: 0/
Queue: Clone-Fast

People
Owner: Nobody in particular
Requestors: pajas [...] matfyz.cz
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.93
Fixed in: (no value)



Subject: Clone::Fast does not preserve weak references, like Storabe::dclone or Clone::clone do
# # The following script demonstrates the problem. # -- Petr Pajas # use warnings; use strict; use Test::More tests => 3; use Scalar::Util qw(isweak weaken); use Clone::Fast; use Clone; my $root = { name => 'ROOT' }; my $node = { name => 'CHILD', parent => $root }; $root->{child}=$node; weaken($node->{parent}); my $fast = Clone::Fast::clone($root); ok(isweak($root->{child}{parent}), 'original is weak'); my $clone = Clone::clone($root); ok(isweak($clone->{child}{parent}), 'Clone::clone is weak'); ok(isweak($fast->{child}{parent}), 'Fast::Clone::clone is weak'); __END__