[Bast-commits] r8736 -
DBIx-Class-Journal/1.000/branches/allow_components_in_journal/lib/DBIx/Class/Schema
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Wed Feb 17 22:58:48 GMT 2010
Author: frew
Date: 2010-02-17 22:58:46 +0000 (Wed, 17 Feb 2010)
New Revision: 8736
Modified:
DBIx-Class-Journal/1.000/branches/allow_components_in_journal/lib/DBIx/Class/Schema/Journal.pm
Log:
all tests pass!
Modified: DBIx-Class-Journal/1.000/branches/allow_components_in_journal/lib/DBIx/Class/Schema/Journal.pm
===================================================================
--- DBIx-Class-Journal/1.000/branches/allow_components_in_journal/lib/DBIx/Class/Schema/Journal.pm 2010-02-17 22:17:15 UTC (rev 8735)
+++ DBIx-Class-Journal/1.000/branches/allow_components_in_journal/lib/DBIx/Class/Schema/Journal.pm 2010-02-17 22:58:46 UTC (rev 8736)
@@ -29,14 +29,21 @@
}
my $c = (blessed( $self )|| $self);
- my @parents = grep { $_ ne 'DBIx::Class::Schema::Journal' } @{mro::get_linear_isa($c)};
+ my @parents = grep {
+ # don't include the class itself as a parent as that will end up
+ # including ::Journal
+ $_ ne $c &&
+
+ # don't include ::Journal in the journal
+ $_ ne 'DBIx::Class::Schema::Journal'
+ } @{mro::get_linear_isa($c)};
+ unshift @parents, 'DBIx::Class::Schema::Journal::DB';
+
my $journal_schema_class = "${c}::Journal";
Class::C3::Componentised->inject_base($journal_schema_class, @parents);
my $proto = $self->__journal_schema_prototype (
- $journal_schema_class->compose_namespace (
- 'DBIx::Class::Schema::Journal::DB'
- )
+ $journal_schema_class->clone
);
my $comp = $self->journal_component || "Journal";
More information about the Bast-commits
mailing list