[Bast-commits] r8741 -
DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Thu Feb 18 16:14:38 GMT 2010
Author: frew
Date: 2010-02-18 16:14:38 +0000 (Thu, 18 Feb 2010)
New Revision: 8741
Modified:
DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm
Log:
different namespace for each journal so two different journals in the same interpreter dont mingle
Modified: DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm
===================================================================
--- DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm 2010-02-18 16:04:19 UTC (rev 8740)
+++ DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm 2010-02-18 16:14:38 UTC (rev 8741)
@@ -28,11 +28,14 @@
{
return $proto;
}
+ my $c = blessed($self)||$self;
+ my $journal_schema_class = "${c}::_JOURNAL";
+ Class::C3::Componentised->inject_base($journal_schema_class, 'DBIx::Class::Schema::Journal::DB');
my $proto = $self->__journal_schema_prototype
(
- DBIx::Class::Schema::Journal::DB->compose_namespace
+ $journal_schema_class->compose_namespace
(
- (blessed($self)||$self) . '::Journal'
+ $c.'::Journal'
)
);
my $comp = $self->journal_component || "Journal";
@@ -119,7 +122,7 @@
my $audit_source = $s_name.$audit;
my $class = blessed($journal_schema) . "::$audit_source";
- Class::C3::Componentised->inject_base($class, "DBIx::Class::Schema::Journal::DB::$audit");
+ Class::C3::Componentised->inject_base($class, "DBIx::Class::Schema::Journal::DB::$audit");
$class->journal_define_table($source);
More information about the Bast-commits
mailing list