From: Peter Rabbitson Date: Sat, 3 Nov 2012 17:50:18 +0000 (+0100) Subject: Fix RT#78436 - a replicated storage does not have a conninfo as such X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1fccee7b0f832366e65f9bdbc842a5d584ef1764;p=dbsrgits%2FDBIx-Class-Historic.git Fix RT#78436 - a replicated storage does not have a conninfo as such --- diff --git a/Changes b/Changes index fbae600..6776d3e 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ Revision history for DBIx::Class sure we do not have refaddr reuse in the global storage registry - Fix failing test on 5.8 under Win32 (RT#81114) - Fix hash-randomization test issues (RT#81638) + - Disallow erroneous calling of connect_info on a replicated storage + (RT#78436) 0.08204 2012-11-08 * New Features / Changes diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 046b30e..6ae6344 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -449,6 +449,11 @@ C, C, C and C. around connect_info => sub { my ($next, $self, $info, @extra) = @_; + $self->throw_exception( + 'connect_info can not be retrieved from a replicated storage - ' + . 'accessor must be called on a specific pool instance' + ) unless defined $info; + my $merge = Hash::Merge->new('LEFT_PRECEDENT'); my %opts;