From: Rafael Kitover <rkitover@cpan.org>
Date: Tue, 16 Feb 2010 13:51:58 +0000 (+0000)
Subject: set behavior for Hash::Merge in ::DBI::Replicated, otherwise it uses the global setting
X-Git-Tag: v0.08120~32
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=282a9a4fb1a740c3500c158d7d6ebb29a86f0f78;p=dbsrgits%2FDBIx-Class.git

set behavior for Hash::Merge in ::DBI::Replicated, otherwise it uses the global setting
---

diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm
index a5de335..ab0a499 100644
--- a/lib/DBIx/Class/Storage/DBI/Replicated.pm
+++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm
@@ -384,7 +384,7 @@ around connect_info => sub {
 
   my $wantarray = wantarray;
 
-  my $merge = Hash::Merge->new;
+  my $merge = Hash::Merge->new('LEFT_PRECEDENT');
 
   my %opts;
   for my $arg (@$info) {
@@ -555,7 +555,7 @@ around connect_replicants => sub {
     $self->throw_exception('too many hashrefs in connect_info')
       if @hashes > 2;
 
-    my $merge = Hash::Merge->new;
+    my $merge = Hash::Merge->new('LEFT_PRECEDENT');
     my %opts = %{ $merge->merge(reverse @hashes) };
 
 # delete them