X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated%2FWithDSN.pm;h=602573901c543ee6a7defe6d4f3175cfd2b6335f;hb=28cea3aa579791963ea117bdbfdbd4ee3e948555;hp=44ad88b012c5426ac40299eea9738ab960dd38be;hpb=bd5da3696c505d7f014320ef53e477985b5f7b3c;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm b/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm index 44ad88b..6025739 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm @@ -13,7 +13,7 @@ information in trace output =head1 SYNOPSIS This class is used internally by L. - + =head1 DESCRIPTION This role adds C info to storage debugging output. @@ -31,8 +31,10 @@ Add C to debugging output. 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($op, $rest) = (($sql=~m/^(\w+)(.+)$/),'NOP', 'NO SQL'); + my $storage_type = $self->can('active') ? 'REPLICANT' : 'MASTER'; + + $self->$method("$op [DSN_$storage_type=$dsn]$rest", @bind); }; =head1 ALSO SEE