[Bast-commits] r7024 - in
DBIx-Class/0.08/branches/new_replication_transaction_fixup:
lib/DBIx/Class/Storage/DBI lib/DBIx/Class/Storage/DBI/Replicated t
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Fri Jul 10 17:37:53 GMT 2009
Author: jnapiorkowski
Date: 2009-07-10 17:37:53 +0000 (Fri, 10 Jul 2009)
New Revision: 7024
Modified:
DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated.pm
DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm
DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm
DBIx-Class/0.08/branches/new_replication_transaction_fixup/t/93storage_replication.t
Log:
a few more Moose Type related fixes and added diag to the replication test to report the moose and types version used, to help us debug some of the moose related errors being reported
Modified: DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm
===================================================================
--- DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm 2009-07-10 17:10:57 UTC (rev 7023)
+++ DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm 2009-07-10 17:37:53 UTC (rev 7024)
@@ -3,7 +3,8 @@
use Moose::Role;
requires 'next_storage';
use MooseX::Types::Moose qw/Int/;
-
+use DBIx::Class::Storage::DBI::Replicated::Pool;
+use DBIx::Class::Storage::DBI::Replicated::Types qw/DBICStorageDBI/;
use namespace::clean -except => 'meta';
=head1 NAME
@@ -48,7 +49,7 @@
has 'master' => (
is=>'ro',
- isa=>'DBIx::Class::Storage::DBI',
+ isa=>DBICStorageDBI,
required=>1,
);
@@ -80,7 +81,7 @@
has 'current_replicant' => (
is=> 'rw',
- isa=>'DBIx::Class::Storage::DBI',
+ isa=>DBICStorageDBI,
lazy_build=>1,
handles=>[qw/
select
Modified: DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm
===================================================================
--- DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm 2009-07-10 17:10:57 UTC (rev 7023)
+++ DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated/Types.pm 2009-07-10 17:37:53 UTC (rev 7024)
@@ -5,12 +5,15 @@
# L<DBIx::Class::Storage::DBI::Replicated>
use MooseX::Types
- -declare => [qw/BalancerClassNamePart Weight/];
+ -declare => [qw/BalancerClassNamePart Weight DBICSchema DBICStorageDBI/];
use MooseX::Types::Moose qw/ClassName Str Num/;
class_type 'DBIx::Class::Storage::DBI';
class_type 'DBIx::Class::Schema';
+subtype DBICSchema, as 'DBIx::Class::Schema';
+subtype DBICStorageDBI, as 'DBIx::Class::Storage::DBI';
+
subtype BalancerClassNamePart,
as ClassName;
Modified: DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated.pm
===================================================================
--- DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated.pm 2009-07-10 17:10:57 UTC (rev 7023)
+++ DBIx-Class/0.08/branches/new_replication_transaction_fixup/lib/DBIx/Class/Storage/DBI/Replicated.pm 2009-07-10 17:37:53 UTC (rev 7024)
@@ -30,7 +30,7 @@
use DBIx::Class::Storage::DBI;
use DBIx::Class::Storage::DBI::Replicated::Pool;
use DBIx::Class::Storage::DBI::Replicated::Balancer;
-use DBIx::Class::Storage::DBI::Replicated::Types 'BalancerClassNamePart';
+use DBIx::Class::Storage::DBI::Replicated::Types qw/BalancerClassNamePart DBICSchema DBICStorageDBI/;
use MooseX::Types::Moose qw/ClassName HashRef Object/;
use Scalar::Util 'reftype';
use Carp::Clan qw/^DBIx::Class/;
@@ -141,7 +141,7 @@
has 'schema' => (
is=>'rw',
- isa=>'DBIx::Class::Schema',
+ isa=>DBICSchema,
weak_ref=>1,
required=>1,
);
@@ -254,7 +254,7 @@
has 'master' => (
is=> 'ro',
- isa=>'DBIx::Class::Storage::DBI',
+ isa=>DBICStorageDBI,
lazy_build=>1,
);
Modified: DBIx-Class/0.08/branches/new_replication_transaction_fixup/t/93storage_replication.t
===================================================================
--- DBIx-Class/0.08/branches/new_replication_transaction_fixup/t/93storage_replication.t 2009-07-10 17:10:57 UTC (rev 7023)
+++ DBIx-Class/0.08/branches/new_replication_transaction_fixup/t/93storage_replication.t 2009-07-10 17:37:53 UTC (rev 7024)
@@ -21,6 +21,10 @@
use_ok 'DBIx::Class::Storage::DBI::Replicated::Replicant';
use_ok 'DBIx::Class::Storage::DBI::Replicated';
+use Moose();
+use MooseX::Types();
+diag "Using Moose version $Moose::VERSION and MooseX::Types version $MooseX::Types::VERSION";
+
=head1 HOW TO USE
This is a test of the replicated storage system. This will work in one of
More information about the Bast-commits
mailing list