Skip Menu |

This queue is for tickets about the FreezeThaw CPAN distribution.

Report information
The Basics
Id: 16088
Status: new
Priority: 0/
Queue: FreezeThaw

People
Owner: Nobody in particular
Requestors: kudra [...] domaintje.com
Cc:
AdminCc:

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



Subject: Data structure with empty elements not preserved
Perl: v5.8.5 built for i686-linux OS: Linux 2.6.11-gentoo-r5GBS In a nested data structure with empty values, the thawed result does not preserve the original structure. In this example, the data structure is an array reference containing three other array references, each of which has 60 values of '0'. The structure freezes properly, so I include only the result of freeze. my $frozen = "FrT;@1|@3|@60|$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0@60|$1|0$1|0$1|0$1|0$1|0$1|1$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0@60|$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0"; my $struct; eval { $struct = thaw($frozen); }; The result is that $struct is undefined and $@ is empty.
Sorry, that should be single quotes around $frozen, which is what I actually tested (I retyped here instead of pasting).
Date: Thu, 1 Dec 2005 16:06:24 -0800
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
To: Guest via RT <bug-FreezeThaw [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #16088] Data structure with empty elements not preserved
RT-Send-Cc:
On Thu, Nov 24, 2005 at 05:55:36AM -0500, Guest via RT wrote: Show quoted text
> In a nested data structure with empty values, the thawed result does
not preserve the original structure. In this example, the data structure is an array reference containing three other array references, each of which has 60 values of '0'. The structure freezes properly, so I include only the result of freeze. I suspect many misprints. I see many differences in this: use FreezeThaw qw(freeze thaw); my @a = (0) x 60; my $frozen = freeze [[@a], [@a], [@a]]; my $frozen1 = 'FrT;@1|@3|@60|$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0@60|$1|0$1|0$1|0$1|0$1|0$1|1$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0@60|$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0$1|0'; print "<$frozen>\n"; print "<$frozen1>\n"; my $struct; print for thaw($frozen); print 11; Hope this helps, Ilya