X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=c902877fc435d96ff6d0c807ae5d58e24d6c0160;hb=503363253e1fa2c35e3b5368dd7f453b9cfbc6a1;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..c902877 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/; @@ -1061,6 +1063,7 @@ sub _query_start { if ( $self->debug ) { @bind = $self->_fix_bind_params(@bind); + $self->debugobj->query_start( $sql, @bind ); } } @@ -1285,6 +1288,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;