From: Aaron Trevena Date: Tue, 4 Mar 2008 19:29:45 +0000 (+0000) Subject: Applied fixes to replication connect_info method X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ac2605bf04e53a884965e5020d14b031ecb31a9;p=dbsrgits%2FDBIx-Class-Historic.git Applied fixes to replication connect_info method --- diff --git a/lib/DBIx/Class/Storage/DBI/Replication.pm b/lib/DBIx/Class/Storage/DBI/Replication.pm index cd13b93..36e8b24 100644 --- a/lib/DBIx/Class/Storage/DBI/Replication.pm +++ b/lib/DBIx/Class/Storage/DBI/Replication.pm @@ -89,9 +89,9 @@ sub connect_info { # We need to copy-pass $global_options, since connect_info clears it while # processing options - $self->write_source->connect_info( [ @{$info->[0]}, { %$global_options } ] ); + $self->write_source->connect_info( @{$info->[0]}, { %$global_options } ); - @dsns = map { ($_->[3]->{priority} || 10) => $_ } @{$info}[1..@$info-1]; + @dsns = map { ($_->[3]->{priority} || 10) => $_ } @{$info->[0]}[1..@{$info->[0]}-1]; $global_options->{dsns} = \@dsns; $self->read_source->connect_info( [ 'dbi:Multi:', undef, undef, { %$global_options } ] );