[Bast-commits] r6143 - in
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI:
. Replicated Replicated/Balancer
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed May 6 03:25:04 GMT 2009
Author: caelum
Date: 2009-05-06 03:25:04 +0000 (Wed, 06 May 2009)
New Revision: 6143
Modified:
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated.pm
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/First.pm
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/Random.pm
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm
DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm
Log:
Replicated - fixup types and namespace::clean
Modified: DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/First.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/First.pm 2009-05-06 03:13:56 UTC (rev 6142)
+++ DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/First.pm 2009-05-06 03:25:04 UTC (rev 6143)
@@ -2,6 +2,7 @@
use Moose;
with 'DBIx::Class::Storage::DBI::Replicated::Balancer';
+use namespace::clean -except => 'meta';
=head1 NAME
@@ -50,4 +51,4 @@
__PACKAGE__->meta->make_immutable;
-1;
\ No newline at end of file
+1;
Modified: DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/Random.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/Random.pm 2009-05-06 03:13:56 UTC (rev 6142)
+++ DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer/Random.pm 2009-05-06 03:25:04 UTC (rev 6143)
@@ -2,6 +2,7 @@
use Moose;
with 'DBIx::Class::Storage::DBI::Replicated::Balancer';
+use namespace::clean -except => 'meta';
=head1 NAME
@@ -59,4 +60,4 @@
__PACKAGE__->meta->make_immutable;
-1;
\ No newline at end of file
+1;
Modified: DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm 2009-05-06 03:13:56 UTC (rev 6142)
+++ DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm 2009-05-06 03:25:04 UTC (rev 6143)
@@ -2,7 +2,10 @@
use Moose::Role;
requires 'next_storage';
+use MooseX::Types::Moose qw/Int/;
+use namespace::clean -except => 'meta';
+
=head1 NAME
DBIx::Class::Storage::DBI::Replicated::Balancer - A Software Load Balancer
@@ -31,7 +34,7 @@
has 'auto_validate_every' => (
is=>'rw',
- isa=>'Int',
+ isa=>Int,
predicate=>'has_auto_validate_every',
);
Modified: DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm 2009-05-06 03:13:56 UTC (rev 6142)
+++ DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm 2009-05-06 03:25:04 UTC (rev 6143)
@@ -6,6 +6,7 @@
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';
@@ -41,7 +42,7 @@
has 'maximum_lag' => (
is=>'rw',
- isa=>'Num',
+ isa=>Num,
required=>1,
lazy=>1,
default=>0,
@@ -57,7 +58,7 @@
has 'last_validated' => (
is=>'rw',
- isa=>'Int',
+ isa=>Int,
reader=>'last_validated',
writer=>'_last_validated',
lazy=>1,
@@ -74,7 +75,7 @@
has 'replicant_type' => (
is=>'ro',
- isa=>'ClassName',
+ isa=>ClassName,
required=>1,
default=>'DBIx::Class::Storage::DBI',
handles=>{
@@ -124,7 +125,7 @@
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',
Modified: DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm 2009-05-06 03:13:56 UTC (rev 6142)
+++ DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm 2009-05-06 03:25:04 UTC (rev 6143)
@@ -2,7 +2,10 @@
use Moose::Role;
requires qw/_query_start/;
+use MooseX::Types::Moose qw/Bool/;
+use namespace::clean -except => 'meta';
+
=head1 NAME
DBIx::Class::Storage::DBI::Replicated::Replicant - A replicated DBI Storage Role
@@ -42,7 +45,7 @@
has 'active' => (
is=>'rw',
- isa=>'Bool',
+ isa=>Bool,
lazy=>1,
required=>1,
default=>1,
@@ -88,4 +91,4 @@
=cut
-1;
\ No newline at end of file
+1;
Modified: DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm 2009-05-06 03:13:56 UTC (rev 6142)
+++ DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm 2009-05-06 03:25:04 UTC (rev 6143)
@@ -5,6 +5,7 @@
use MooseX::Types::Moose qw/ClassName Str/;
class_type 'DBIx::Class::Storage::DBI';
+class_type 'DBIx::Class::Schema';
subtype BalancerClassNamePart,
as ClassName;
Modified: DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated.pm
===================================================================
--- DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated.pm 2009-05-06 03:13:56 UTC (rev 6142)
+++ DBIx-Class/0.08/branches/storage-tweaks/lib/DBIx/Class/Storage/DBI/Replicated.pm 2009-05-06 03:25:04 UTC (rev 6143)
@@ -29,6 +29,7 @@
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';
@@ -136,7 +137,7 @@
has 'pool_type' => (
is=>'ro',
- isa=>'ClassName',
+ isa=>ClassName,
required=>1,
default=>'DBIx::Class::Storage::DBI::Replicated::Pool',
handles=>{
@@ -153,7 +154,7 @@
has 'pool_args' => (
is=>'ro',
- isa=>'HashRef',
+ isa=>HashRef,
lazy=>1,
required=>1,
default=>sub { {} },
@@ -187,7 +188,7 @@
has 'balancer_args' => (
is=>'ro',
- isa=>'HashRef',
+ isa=>HashRef,
lazy=>1,
required=>1,
default=>sub { {} },
@@ -254,7 +255,7 @@
has 'read_handler' => (
is=>'rw',
- isa=>'Object',
+ isa=>Object,
lazy_build=>1,
handles=>[qw/
select
@@ -271,7 +272,7 @@
has 'write_handler' => (
is=>'ro',
- isa=>'Object',
+ isa=>Object,
lazy_build=>1,
lazy_build=>1,
handles=>[qw/
More information about the Bast-commits
mailing list