X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=d0f5b1ee21aa7d3b2ec43011d2f5f6b28bcf43c3;hb=a89c6fc05a07aac7f7b4c2b115a12e10aab7fd05;hp=2c45eeebc682c38c95035b9618c6539068acc57e;hpb=0da8b7da7a9df7b84e9a3228cd1f5feb1d65bb07;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 2c45eee..d0f5b1e 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -5,6 +5,7 @@ use base 'DBIx::Class::Storage'; use strict; use warnings; +use Carp::Clan qw/^DBIx::Class/; use DBI; use SQL::Abstract::Limit; use DBIx::Class::Storage::DBI::Cursor; @@ -25,7 +26,8 @@ __PACKAGE__->sql_maker_class('DBIC::SQL::Abstract'); BEGIN { -package DBIC::SQL::Abstract; # Would merge upstream, but nate doesn't reply :( +package # Hide from PAUSE + DBIC::SQL::Abstract; # Would merge upstream, but nate doesn't reply :( use base qw/SQL::Abstract::Limit/; @@ -1285,6 +1287,7 @@ sub select_single { my $self = shift; my ($rv, $sth, @bind) = $self->_select(@_); my @row = $sth->fetchrow_array; + carp "Query returned more than one row" if $sth->fetchrow_array; # Need to call finish() to work round broken DBDs $sth->finish(); return @row;