Subject: | Re-assignment of nested structures fails |
If I copy a deep structure, then reassign it back to the db, I get:
Can't call method "offset" on an undefined value at
/usr/local/share/perl/5.10.0/DBM/Deep/Sector/File/BucketList.pm line 22
Minimal example:
my $db = DBM::Deep->new(
file => '/tmp/test',
);
my $new = {bar => 1, baz => 2};
$db->{foo} = [$new];
my @new = @{$db->{foo}};
$db->{foo} = \@new; # Dies
Looking at the dumped data, it looks like the deep copy is returning
blessed objects rather than plain old hashes, which could be where the
problem lies.
This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
Linux samc-pc 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC
2010 x86_64 GNU/Linux
CPAN_FILE S/SP/SPROUT/DBM-Deep-1.0022.tar.gz