support ::DBI::Replicated opts in connect_info
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Replicated / Replicant.pm
index b766bed..9e32ca3 100644 (file)
@@ -2,10 +2,13 @@ package DBIx::Class::Storage::DBI::Replicated::Replicant;
 
 use Moose::Role;
 requires qw/_query_start/;
+use MooseX::Types::Moose qw/Bool/;
+
+use namespace::clean -except => 'meta';
 
 =head1 NAME
 
-DBIx::Class::Storage::DBI::Replicated::Replicant; A replicated DBI Storage Role
+DBIx::Class::Storage::DBI::Replicated::Replicant - A replicated DBI Storage Role
 
 =head1 SYNOPSIS
 
@@ -42,7 +45,7 @@ storage driver for more information.
 
 has 'active' => (
   is=>'rw',
-  isa=>'Bool',
+  isa=>Bool,
   lazy=>1,
   required=>1,
   default=>1,
@@ -52,7 +55,7 @@ has 'active' => (
 
 This class defines the following methods.
 
-=head2 after: _query_start
+=head2 around: _query_start
 
 advice iof the _query_start method to add more debuggin
 
@@ -60,7 +63,7 @@ advice iof the _query_start method to add more debuggin
 
 around '_query_start' => sub {
   my ($method, $self, $sql, @bind) = @_;
-  my $dsn = $self->connect_info->[0];
+  my $dsn = $self->_dbi_connect_info->[0];
   $self->$method("DSN: $dsn SQL: $sql", @bind);
 };
 
@@ -74,6 +77,10 @@ sub debugobj {
     return shift->schema->storage->debugobj;
 }
 
+=head1 ALSO SEE
+
+L<<a href="http://en.wikipedia.org/wiki/Replicant">http://en.wikipedia.org/wiki/Replicant</a>>
+
 =head1 AUTHOR
 
 John Napiorkowski <john.napiorkowski@takkle.com>
@@ -84,4 +91,4 @@ You may distribute this code under the same terms as Perl itself.
 
 =cut
 
-1;
\ No newline at end of file
+1;