From: John Napiorkowski Date: Thu, 10 Jul 2008 21:14:04 +0000 (+0000) Subject: make sure debugobj calls always go to the master X-Git-Tag: v0.08240~402^2~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=edbf2778a01ae8e753d17c2ae282bfb9e708f214;p=dbsrgits%2FDBIx-Class.git make sure debugobj calls always go to the master --- diff --git a/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm b/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm index 32d3c2c..b766bed 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm @@ -1,6 +1,7 @@ package DBIx::Class::Storage::DBI::Replicated::Replicant; use Moose::Role; +requires qw/_query_start/; =head1 NAME @@ -63,6 +64,16 @@ around '_query_start' => sub { $self->$method("DSN: $dsn SQL: $sql", @bind); }; +=head2 debugobj + +Override the debugobj method to redirect this method call back to the master. + +=cut + +sub debugobj { + return shift->schema->storage->debugobj; +} + =head1 AUTHOR John Napiorkowski