From: John Napiorkowski Date: Fri, 9 May 2008 18:32:58 +0000 (+0000) Subject: doh, replaced ability to configure pool args via the storage args X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f068a139c662bde5a7d03de9eff98aa3c3e8ade2;p=dbsrgits%2FDBIx-Class-Historic.git doh, replaced ability to configure pool args via the storage args --- diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index a70a8b5..27136b1 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -73,6 +73,22 @@ has 'pool_type' => ( }, ); +=head2 pool_args + +Contains a hashref of initialized information to pass to the Balancer object. +See L for available arguments. + +=cut + +has 'pool_args' => ( + is=>'ro', + isa=>'HashRef', + lazy=>1, + required=>1, + default=>sub { {} }, +); + + =head2 balancer_type The replication pool requires a balance class to provider the methods for @@ -92,13 +108,16 @@ has 'balancer_type' => ( =head2 balancer_args Contains a hashref of initialized information to pass to the Balancer object. -See L for available arguments. +See L for available arguments. =cut has 'balancer_args' => ( is=>'ro', isa=>'HashRef', + lazy=>1, + required=>1, + default=>sub { {} }, ); =head2 pool @@ -270,7 +289,7 @@ Lazy builder for the L attribute. sub _build_pool { my $self = shift @_; - $self->create_pool; + $self->create_pool(%{$self->pool_args}); } =head2 _build_balancer_type