[Bast-commits] r4375 -
DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Fri May 9 19:32:58 BST 2008
Author: jnapiorkowski
Date: 2008-05-09 19:32:58 +0100 (Fri, 09 May 2008)
New Revision: 4375
Modified:
DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm
Log:
doh, replaced ability to configure pool args via the storage args
Modified: DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm
===================================================================
--- DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm 2008-05-09 17:00:46 UTC (rev 4374)
+++ DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm 2008-05-09 18:32:58 UTC (rev 4375)
@@ -73,6 +73,22 @@
},
);
+=head2 pool_args
+
+Contains a hashref of initialized information to pass to the Balancer object.
+See L<DBIx::Class::Storage::Replicated::Pool> for available arguments.
+
+=cut
+
+has 'pool_args' => (
+ is=>'ro',
+ isa=>'HashRef',
+ lazy=>1,
+ required=>1,
+ default=>sub { {} },
+);
+
+
=head2 balancer_type
The replication pool requires a balance class to provider the methods for
@@ -92,13 +108,16 @@
=head2 balancer_args
Contains a hashref of initialized information to pass to the Balancer object.
-See L<DBIx::Class::Storage::Replicated::Pool> for available arguments.
+See L<DBIx::Class::Storage::Replicated::Balancer> for available arguments.
=cut
has 'balancer_args' => (
is=>'ro',
isa=>'HashRef',
+ lazy=>1,
+ required=>1,
+ default=>sub { {} },
);
=head2 pool
@@ -270,7 +289,7 @@
sub _build_pool {
my $self = shift @_;
- $self->create_pool;
+ $self->create_pool(%{$self->pool_args});
}
=head2 _build_balancer_type
More information about the Bast-commits
mailing list