Skip Menu |

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

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

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

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



Subject: clear() leaves one key unless there's only one
Following program illustrates that clear() leaves one key in unless there's only one there: use strict; use warnings; use DBM::Deep; unlink '/tmp/foo.db'; my $db = DBM::Deep->new ('/tmp/foo.db' ); $db->{block} = { }; $db->{critical} = { }; $db->{minor} = { }; $db->clear; print "Now have " . keys(%$db) . " key\n"; $db->clear; print "Now have " . keys(%$db) . " keys\n"; __END__ Output: Now have 1 key Now have 0 keys Verified on Fedora Core 9 and Solaris 9.
 Fixed in 1.0019_02 (soon to be released). http://github.com/robkinyon/dbm-deep/commit/cd5303b4d4ed6281f0bd85a7b8ef221d7005a00b

NOTE: This fix has created a regression in terms of performance when clearing large hashes using the File backend. I anticipate fixing this before the the 1.0020 release.