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: 6368
Status: new
Priority: 0/
Queue: Storable

Owner: Nobody in particular
Requestors: spambait [...]

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

Subject: weak references aren't preserved when frozen
Download (untitled) / with headers
text/plain 676b
Any frozen weak references will become regular references when thawed. ------------ Version: ------------ Storable: 2.12 perl: 5.6.1 for debian linux and 5.8.2 for solaris ------------ Test case: ------------ use strict; use Storable qw(freeze thaw); use Scalar::Util qw(weaken isweak); use Test::More tests => 3; # make a circular reference, then weaken it my $a={}; $a->{a}=\$a; weaken($a->{a}); # looks like we're ok ok(isweak($a->{a}),"weak reference created"); # serilize it my $b=freeze($a); # and unpack it my $c=thaw($b); # check if the weak reference survived the freeze ok($c->{a},"reference came back out"); ok(isweak($c->{a}),"weak references preserved");

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

Please report any issues with to