From: Rafael Kitover Date: Wed, 10 Feb 2010 20:40:07 +0000 (+0000) Subject: revert Moose bug workaround, bump Moose dep for Replicated to 0.98 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec0946db9da3886dce995f30240dbd405ee4c74d;p=dbsrgits%2FDBIx-Class-Historic.git revert Moose bug workaround, bump Moose dep for Replicated to 0.98 --- diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 9e3f59c..3385e53 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -7,7 +7,7 @@ BEGIN { ## use, so we explicitly test for these. my %replication_required = ( - 'Moose' => '0.90', + 'Moose' => '0.98', 'MooseX::Types' => '0.21', 'namespace::clean' => '0.11', 'Hash::Merge' => '0.11' @@ -120,7 +120,7 @@ to force a query to run against Master when needed. Replicated Storage has additional requirements not currently part of L - Moose => '0.90', + Moose => '0.98', MooseX::Types => '0.21', namespace::clean => '0.11', Hash::Merge => '0.11' @@ -392,12 +392,7 @@ around connect_info => sub { $master->_determine_driver; Moose::Meta::Class->initialize(ref $master); - my $class = Moose::Meta::Class->create_anon_class( - superclasses => [ ref $master ], - roles => [ 'DBIx::Class::Storage::DBI::Replicated::WithDSN' ], - cache => 1, - ); - $class->rebless_instance($master); + DBIx::Class::Storage::DBI::Replicated::WithDSN->meta->apply($master); # link pool back to master $self->pool->master($master); diff --git a/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm b/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm index dfc33ec..500f739 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm @@ -254,12 +254,7 @@ sub connect_replicant { Moose::Meta::Class->initialize(ref $replicant); - my $class = Moose::Meta::Class->create_anon_class( - superclasses => [ ref $replicant ], - roles => [ 'DBIx::Class::Storage::DBI::Replicated::Replicant' ], - cache => 1, - ); - $class->rebless_instance($replicant); + DBIx::Class::Storage::DBI::Replicated::Replicant->meta->apply($replicant); # link back to master $replicant->master($self->master);