Applied fixes to replication connect_info method
Aaron Trevena [Tue, 4 Mar 2008 19:29:45 +0000 (19:29 +0000)]
lib/DBIx/Class/Storage/DBI/Replication.pm

index cd13b93..36e8b24 100644 (file)
@@ -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 } ] );