Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 12503
Status: resolved
Priority: 0/
Queue: DBD-Pg

Owner: Nobody in particular
Requestors: alexw [...]

Bug Information
Severity: Normal
Broken in: 1.40
Fixed in: 1.42


From: Alexandra Walford <alexw [...]>
To: bug-dbd-pg [...]
Subject: DBD::Pg 1.41: last_insert_id method calls die
Date: Tue, 3 May 2005 14:09:45 +1000
Download (untitled) / with headers
text/plain 1.4k
Hi, Since the last_insert_id method was added to DBD::Pg 1.40 (Bug # 3803), we've noted that calls to die occur on lines 229, 246, 267, 281, 293 and 299 of DBD/ (revision 1.153, although the situation is unchanged in latest CVS - revision 1.155). We use DBD::Pg in a production environment, and this use of die causes a few problems for us (which we can work around using $SIG{__DIE__} handlers and/or eval) - but IMHO die does not belong in a publically released package such as DBD::Pg. In fact, apart from the data_sources method, last_insert_id is the only method which uses die in DBD::Pg. This leads me to believe that you (the developers) also take this view and usually minimise the use of die in this package. I have created a patch (attached) which simply replaces the calls to die with 'return undef'; this may or may not be the correct approach in your eyes but it Works For Me (tm) and seems somewhat consistent with the rest of the package. Anyway, I hope that either this patch is of use or that someone better qualified :) can patch DBD::Pg to resolve this issue. [By the way, my apologies if there is already a bug tracking this issue; I am unused to and cannot find a way to quickly search through bug reports. I did find a thread on dbdpg-general touching on the use of die but am unaware of any further activity: ] Regards, Alexandra Walford

Message body is not shown because sender requested not to inline it.

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

Please report any issues with to