[Bast-commits] r6667 -
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat Jun 13 23:20:02 GMT 2009
Author: caelum
Date: 2009-06-13 23:20:02 +0000 (Sat, 13 Jun 2009)
New Revision: 6667
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm
Log:
fix master debug output for ::Replicated
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm 2009-06-13 22:23:15 UTC (rev 6666)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm 2009-06-13 23:20:02 UTC (rev 6667)
@@ -366,10 +366,11 @@
$res = $self->$next($info, @extra);
}
- # May have to reapply role if master will be reblessed to a more specific
- # driver.
- $self->master->_determine_driver;
- DBIx::Class::Storage::DBI::Replicated::WithDSN->meta->apply($self->master);
+ # Make sure master is blessed into the correct class and apply role to it.
+ my $master = $self->master;
+ $master->_determine_driver;
+ Moose::Meta::Class->initialize(ref $master);
+ DBIx::Class::Storage::DBI::Replicated::WithDSN->meta->apply($master);
$wantarray ? @res : $res;
};
@@ -405,7 +406,6 @@
sub _build_master {
my $self = shift @_;
my $master = DBIx::Class::Storage::DBI->new($self->schema);
- DBIx::Class::Storage::DBI::Replicated::WithDSN->meta->apply($master);
$master
}
More information about the Bast-commits
mailing list