Skip Menu |
 

This queue is for tickets about the DB_File CPAN distribution.

Report information
The Basics
Id: 4629
Status: open
Priority: 0/
Queue: DB_File

People
Owner: pmqs [...] cpan.org
Requestors: Paul.Marquess [...] btinternet.com
Cc: Peter.Dintelmann [...] Dresdner-Bank.com
AdminCc:

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



From: "Paul Marquess" <Paul.Marquess [...] btinternet.com>
To: <bug-DB_File [...] rt.cpan.org>
Subject: FW: DB_File delete in tied hash
Date: Wed, 10 Dec 2003 14:32:44 -0000
Download (untitled) / with headers
text/plain 874b
Show quoted text
-----Original Message----- From: Dintelmann, Peter [mailto:Peter.Dintelmann@Dresdner-Bank.com] Sent: 05 December 2003 15:19 To: 'Paul.Marquess@btinternet.com' Subject: DB_File delete in tied hash Hi Paul, when using a hash tied to DB_File I observed that deleting a non-existent element from the hash returns -30990. $ perl -MDB_File -le 'tie my %h, "DB_File"; print delete $h{x}' -30990 $ perl -MDB_File -le 'print $DB_File::VERSION' 1.807 However perlfunc(1) states that delete() returns undef if the specified element does not exist. Can you change this? Best regards, Peter Dintelmann -- Dr. Peter Dintelmann Dresdner Bank AG CC IT MIS - MIS@ Products Theodor-Heuss-Allee 110 D-60301 Frankfurt Germany Tel.: +49-(0)69-263-19722 Email: Peter.Dintelmann@dresdner-bank.com http://www.dresdner-bank.com http://mis.dresdner-bank.com
Download (untitled) / with headers
text/plain 1.3k
Hi Peter I've moved your request to the CPAN bug queue. See https://rt.cpan.org/Ticket/Display.html?id=4629 for details. Regarding yourrequest, I'm in two minds about it. Yes, the existing behaviour doesn't match the man page, but the existing (broken) functionality has been like that for years and I don't want to break any scripts that assume the broken functionality. Also, this would only be a partial fix, because "delete $h{$x}" is supposed to return the value deleted. It doesn't for DB_File. Let me run this one past the perl5-porters and see if anyone else has an opinion on this. cheers Paul Show quoted text
> > > Hi Paul, > > when using a hash tied to DB_File I observed that > deleting a non-existent element from the hash > returns -30990. > > $ perl -MDB_File -le 'tie my %h, "DB_File"; print delete $h{x}' > -30990 > > $ perl -MDB_File -le 'print $DB_File::VERSION' > 1.807 > > However perlfunc(1) states that delete() returns > undef if the specified element does not exist. > > Can you change this? > > Best regards, > > Peter Dintelmann > > -- > Dr. Peter Dintelmann > Dresdner Bank AG > CC IT MIS - MIS@ Products > Theodor-Heuss-Allee 110 > D-60301 Frankfurt > Germany > > Tel.: +49-(0)69-263-19722 > Email: Peter.Dintelmann@dresdner-bank.com > > http://www.dresdner-bank.com > http://mis.dresdner-bank.com >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.