Skip Menu |

This queue is for tickets about the CHI-Driver-BerkeleyDB CPAN distribution.

Report information
The Basics
Id: 103290
Status: patched
Priority: 0/
Queue: CHI-Driver-BerkeleyDB

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

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



Subject: Noise when removing non-existent entry
Program source: #!/usr/bin/perl -w use CHI; my $cache = CHI->new(driver => 'BerkeleyDB', root_dir => '/tmp', namespace => 'test'); $cache->remove('foo'); Give this: BDB0062 Successful return: 0 at /usr/local/share/perl/5.20.2/CHI/Driver/BerkeleyDB.pm line 77. It would be better if it gave no output at all.
It's even worse when the "remove" is called from "purge". At least before calling remove I can be sure the key doesn't exist, but I can't prevent it when purge is calling remove on a non-existant key.
Thanks for this and other bug reports Nigel. Please consider creating some pull requests against https://github.com/jonswar/perl-chi On Sun May 24 17:28:01 2015, NHORNE wrote: Show quoted text
> It's even worse when the "remove" is called from "purge". At least > before calling remove I can be sure the key doesn't exist, but I can't > prevent it when purge is calling remove on a non-existant key.
On Fri Apr 03 09:55:53 2015, NHORNE wrote: Show quoted text
> Program source: > > #!/usr/bin/perl -w > > use CHI; > > my $cache = CHI->new(driver => 'BerkeleyDB', root_dir => '/tmp', > namespace => 'test'); > > $cache->remove('foo'); > > Give this: > > BDB0062 Successful return: 0 at > /usr/local/share/perl/5.20.2/CHI/Driver/BerkeleyDB.pm line 77. > > It would be better if it gave no output at all.
Hi. I have recently taken over this module, and this has been fixed in v0.05, which I have just released to CPAN. remove() no longer does a die $BerkeleyDB::ERROR if the response code is either "0", or, DB_NOTFOUND. This fixes this problem. -- Regards, Michael Schout