From: Rafael Kitover Date: Sat, 9 May 2009 12:21:44 +0000 (+0000) Subject: ::DBI::Replicated - don't build pool/balancer from connect_info unless necessary X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=67c438630af58cb7032da2206200a6247eabdff3;p=dbsrgits%2FDBIx-Class-Historic.git ::DBI::Replicated - don't build pool/balancer from connect_info unless necessary --- diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index d6eb2fd..465eec0 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -337,7 +337,8 @@ around connect_info => sub { %{ delete $opts{pool_args} || {} } }); - $self->pool($self->_build_pool); + $self->pool($self->_build_pool) + if $self->pool; } if (@opts{qw/balancer_type balancer_args/}) { @@ -349,7 +350,8 @@ around connect_info => sub { %{ delete $opts{balancer_args} || {} } }); - $self->balancer($self->_build_balancer); + $self->balancer($self->_build_balancer) + if $self->balancer; } $self->_master_connect_info_opts(\%opts);