Skip Menu |

This queue is for tickets about the DBM-Deep CPAN distribution.

Report information
The Basics
Id: 33863
Status: resolved
Priority: 0/
Queue: DBM-Deep

People
Owner: Nobody in particular
Requestors: pjs [...] cpan.org
Cc:
AdminCc:

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



Subject: Shifting arrayref out of arrayref leaves empty slot
The only difference between these two runs is an inner pair of square brackets. Both runs should yield an empty array in the hash entry, but this doesn't happen when the thing being shifted out is an array ref itself. $ perl -MDBM::Deep -MData::Dumper -le '$db = DBM::Deep->new("/tm p/db"); $db->{ghi} = [ 42 ]; shift @{ $db->{ghi} }; $db->optimize; print scalar @{ $db->{ghi} }; print Dumper $db->{ghi}' 0 $VAR1 = bless( [], 'DBM::Deep::Array' ); $ perl -MDBM::Deep -MData::Dumper -le '$db = DBM::Deep->new("/tmp/db"); $db->{ghi} = [ [42] ]; shift @{ $db->{ghi} }; $db->optimize; print scalar @{ $db->{ghi} }; print Dumper $db->{ghi}' 1 $VAR1 = bless( [ undef ], 'DBM::Deep::Array' ); Verified with 5.8.8 on Solaris 2.9 and 5.10.0 on Linux.
This has been resolved in 1.0010