From: John Napiorkowski Date: Thu, 9 Jul 2009 18:17:03 +0000 (+0000) Subject: more changes to the way debug output works X-Git-Tag: v0.08109~76^2~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1fa4a3e2bfb302892dd6d6fdc8991367e185d63a;p=dbsrgits%2FDBIx-Class.git more changes to the way debug output works --- diff --git a/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm b/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm index 44ad88b..7d43c85 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm @@ -32,7 +32,10 @@ around '_query_start' => sub { my ($method, $self, $sql, @bind) = @_; my $dsn = $self->_dbi_connect_info->[0]; my($op, $rest) = ($sql=~m/^(\w+) (.+)$/); - $self->$method("$op [DSN=$dsn] $rest", @bind); + + my $storage_type = $self->can('active') ? 'REPLICANT' : 'MASTER'; + + $self->$method("$op [DSN_$storage_type=$dsn] $rest", @bind); }; =head1 ALSO SEE