X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated.pm;h=1d6102f0e26e451cdaff06d212ad3483088bd3f4;hb=0488c7e1294791e01dc75dfe633454d0f4201384;hp=91ce826b3039566bc51fc96027b3a39ce5e86164;hpb=a63c42fc0b2844ff59bc86719fbe2c779067f171;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 91ce826..1d6102f 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -37,7 +37,7 @@ also define your arguments, such as which balancer you want and any arguments that the Pool object should get. my $schema = Schema::Class->clone; - $schema->storage_type( ['::DBI::Replicated', {balancer=>'::Random'}] ); + $schema->storage_type(['::DBI::Replicated', { balancer_type => '::Random' }]); $schema->connection(...); Next, you need to add in the Replicants. Basically this is an array of @@ -338,6 +338,7 @@ my $method_dispatch = { _dbh_get_info _determine_connector_driver + _extract_driver_from_connect_info _describe_connection _warn_undetermined_driver @@ -1095,7 +1096,7 @@ attribute: my $result = $resultset->search(undef, {force_pool=>'master'})->find($pk); -This attribute will safely be ignore by non replicated storages, so you can use +This attribute will safely be ignored by non replicated storages, so you can use the same code for both types of systems. Lastly, you can use the L method, which works very much like