X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated.pm;h=f8958da1402df8500c201dac84735c8b8059f321;hb=a705b1758c359438b683daa2c2b1e8cb5a3377da;hp=759f3ac4b2121169eef2ac5a1e509a6444cef907;hpb=6a9765c19a33187ad323e0eb685d38c08a97deaf;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 759f3ac..f8958da 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -7,8 +7,7 @@ BEGIN { ## use, so we explicitly test for these. my %replication_required = ( - 'Moose' => '0.87', - 'MooseX::AttributeHelpers' => '0.21', + 'Moose' => '0.90', 'MooseX::Types' => '0.16', 'namespace::clean' => '0.11', 'Hash::Merge' => '0.11' @@ -51,7 +50,9 @@ You should set the 'storage_type attribute to a replicated type. You should 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->connection(...); Next, you need to add in the Replicants. Basically this is an array of arrayrefs, where each arrayref is database connect information. Think of these @@ -119,8 +120,7 @@ to force a query to run against Master when needed. Replicated Storage has additional requirements not currently part of L - Moose => '0.87', - MooseX::AttributeHelpers => '0.20', + Moose => '0.90', MooseX::Types => '0.16', namespace::clean => '0.11', Hash::Merge => '0.11' @@ -325,7 +325,6 @@ has 'write_handler' => ( _count_select _subq_count_select _subq_update_delete - order_select_columns svp_rollback svp_begin svp_release @@ -410,7 +409,7 @@ bits get put into the correct places. =cut sub BUILDARGS { - my ($class, $schema, $storage_type_args, @args) = @_; + my ($class, $schema, $storage_type_args, @args) = @_; return { schema=>$schema,