use DBIx::Class::Storage::DBI::Replicated::Pool;
use DBIx::Class::Storage::DBI::Replicated::Balancer;
use DBIx::Class::Storage::DBI::Replicated::Types 'BalancerClassNamePart';
+use MooseX::Types::Moose qw/ClassName HashRef Object/;
use namespace::clean -except => 'meta';
has 'pool_type' => (
is=>'ro',
- isa=>'ClassName',
+ isa=>ClassName,
required=>1,
default=>'DBIx::Class::Storage::DBI::Replicated::Pool',
handles=>{
has 'pool_args' => (
is=>'ro',
- isa=>'HashRef',
+ isa=>HashRef,
lazy=>1,
required=>1,
default=>sub { {} },
has 'balancer_args' => (
is=>'ro',
- isa=>'HashRef',
+ isa=>HashRef,
lazy=>1,
required=>1,
default=>sub { {} },
has 'read_handler' => (
is=>'rw',
- isa=>'Object',
+ isa=>Object,
lazy_build=>1,
handles=>[qw/
select
has 'write_handler' => (
is=>'ro',
- isa=>'Object',
+ isa=>Object,
lazy_build=>1,
lazy_build=>1,
handles=>[qw/
use Moose::Role;
requires 'next_storage';
+use MooseX::Types::Moose qw/Int/;
+
+use namespace::clean -except => 'meta';
=head1 NAME
has 'auto_validate_every' => (
is=>'rw',
- isa=>'Int',
+ isa=>Int,
predicate=>'has_auto_validate_every',
);
use Moose;
with 'DBIx::Class::Storage::DBI::Replicated::Balancer';
+use namespace::clean -except => 'meta';
=head1 NAME
__PACKAGE__->meta->make_immutable;
-1;
\ No newline at end of file
+1;
use Moose;
with 'DBIx::Class::Storage::DBI::Replicated::Balancer';
+use namespace::clean -except => 'meta';
=head1 NAME
__PACKAGE__->meta->make_immutable;
-1;
\ No newline at end of file
+1;
use List::Util 'sum';
use Scalar::Util 'reftype';
use Carp::Clan qw/^DBIx::Class/;
+use MooseX::Types::Moose qw/Num Int ClassName HashRef/;
use namespace::clean -except => 'meta';
has 'maximum_lag' => (
is=>'rw',
- isa=>'Num',
+ isa=>Num,
required=>1,
lazy=>1,
default=>0,
has 'last_validated' => (
is=>'rw',
- isa=>'Int',
+ isa=>Int,
reader=>'last_validated',
writer=>'_last_validated',
lazy=>1,
has 'replicant_type' => (
is=>'ro',
- isa=>'ClassName',
+ isa=>ClassName,
required=>1,
default=>'DBIx::Class::Storage::DBI',
handles=>{
has 'replicants' => (
is=>'rw',
metaclass => 'Collection::Hash',
- isa=>'HashRef[DBIx::Class::Storage::DBI]',
+ isa=>HashRef['DBIx::Class::Storage::DBI'],
default=>sub {{}},
provides => {
'set' => 'set_replicant',
use Moose::Role;
requires qw/_query_start/;
+use MooseX::Types::Moose qw/Bool/;
+
+use namespace::clean -except => 'meta';
=head1 NAME
has 'active' => (
is=>'rw',
- isa=>'Bool',
+ isa=>Bool,
lazy=>1,
required=>1,
default=>1,
=cut
-1;
\ No newline at end of file
+1;
use MooseX::Types::Moose qw/ClassName Str/;
class_type 'DBIx::Class::Storage::DBI';
+class_type 'DBIx::Class::Schema';
subtype BalancerClassNamePart,
as ClassName;