Skip Menu |

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 35724
Status: rejected
Priority: 0/
Queue: DBI

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

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



Subject: DBI does not specify what must return selectrow_hashref if there are no rows and no errors
ERROR in documentation: http://search.cpan.org/~timb/DBI-1.604/DBI.pm#selectrow_hashref When I execute do: my $data= $context->{dbh}->selectrow_hashref( 'SELECT 1 WHERE false' ); I get 'undef' value in my $data. This is wrong. Here I must get '0E0' which is true but false Test case for this situation: my $data= $context->{dbh}->selectrow_hashref( 'SELECT 1 WHERE false' ) or die $DBI::errstr; ACTUAL RESULTS: programm died EXPECTED RESULTS: programm must not die I am using precompiled DBD::Pg 2.0.0
Show quoted text
> I am using precompiled DBD::Pg 2.0.0
ActivePerl 5.10 WinXP_SP2
I believe the docs are sufficiently clear. fetchrow_hashref (called by selectrow_hashref) returns undef if there are no rows.