Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBIx-Abstract CPAN distribution.

Report information
The Basics
Id: 2397
Status: resolved
Priority: 0/
Queue: DBIx-Abstract

People
Owner: WINTER [...] cpan.org
Requestors: amm2 [...] andrew.cmu.edu
Cc:
AdminCc:

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



Subject: select_one_to_array problem
sub select_one_to_array doesn't indicate errors correctly. This sub is called as @list = $obj->select_one_to_array(...) If there's no data, it should return an empty list. Right now, it returns a list of 1 element: ( undef ) instead of an empty list: () This following code: my $result = $db->fetchrow_arrayref; return undef unless $result; Should best be replaced with: my $result = $db->fetchrow_arrayref or return; In fact, this can be used in the other similar methods (select_one_to_hashref, select_one_to_arrayref) because "return" without arguments has the wonderful feature of returning undef in scalar context, or an empty list in array context. Thank you, Alex Manousakis
Fixed on github, to be released in 1.03 later today