From: David Kamholz Date: Mon, 6 Feb 2006 01:27:24 +0000 (+0000) Subject: more helpfully output NULLs in Storage::DBI _execute debug output X-Git-Tag: v0.05005~43 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f59ffc793d55769d63b352c9e392e78927130108;p=dbsrgits%2FDBIx-Class.git more helpfully output NULLs in Storage::DBI _execute debug output --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index cb1dbd7..296a688 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -318,7 +318,10 @@ sub _execute { my ($self, $op, $extra_bind, $ident, @args) = @_; my ($sql, @bind) = $self->sql_maker->$op($ident, @args); unshift(@bind, @$extra_bind) if $extra_bind; - $self->debugfh->print("$sql: @bind\n") if $self->debug; + if ($self->debug) { + my @debug_bind = map { defined $_ ? $_ : 'NULL' } @bind; + $self->debugfh->print("$sql: @debug_bind\n"); + } my $sth = $self->sth($sql,$op); @bind = map { ref $_ ? ''.$_ : $_ } @bind; # stringify args my $rv;