Fix RT#78436 - a replicated storage does not have a conninfo as such
Peter Rabbitson [Sat, 3 Nov 2012 17:50:18 +0000 (18:50 +0100)]
Changes
lib/DBIx/Class/Storage/DBI/Replicated.pm

diff --git a/Changes b/Changes
index fbae600..6776d3e 100644 (file)
--- 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
index 046b30e..6ae6344 100644 (file)
@@ -449,6 +449,11 @@ C<pool_type>, C<pool_args>, C<balancer_type> and C<balancer_args>.
 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;