[Bast-commits] r8730 -
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 00:06:02 GMT 2010
Author: frew
Date: 2010-02-17 00:06:01 +0000 (Wed, 17 Feb 2010)
New Revision: 8730
Modified:
DBIx-Class-Journal/1.000/branches/allow_components_in_journal/lib/DBIx/Class/Schema/Journal.pm
Log:
initial (broken?) commit
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-16 23:52:44 UTC (rev 8729)
+++ DBIx-Class-Journal/1.000/branches/allow_components_in_journal/lib/DBIx/Class/Schema/Journal.pm 2010-02-17 00:06:01 UTC (rev 8730)
@@ -24,15 +24,20 @@
sub _journal_schema_prototype
{
my $self = shift;
- if (my $proto = $self->__journal_schema_prototype)
- {
- return $proto;
+ if (my $proto = $self->__journal_schema_prototype) {
+ return $proto;
}
- my $proto = $self->__journal_schema_prototype
- (
- DBIx::Class::Schema::Journal::DB->compose_namespace
- (
- (blessed($self)||$self) . '::Journal'
+
+ my $c = (blessed( $self )|| $self);
+ no strict 'refs';
+ my @parents = grep { $_ ne 'DBIx::Class::Schema::Journal' } @{$c."::ISA"};
+ use strict;
+ 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'
)
);
my $comp = $self->journal_component || "Journal";
@@ -93,6 +98,22 @@
return $schema;
}
+sub create_ddl_dir
+{
+ my $self = shift;
+
+ $self->next::method(@_);
+
+ $self->journal_schema_create_ddl_dir(@_);
+}
+
+sub journal_schema_create_ddl_dir
+{
+ my $self = shift;
+
+ $self->_journal_schema->create_ddl_dir( @_ );
+}
+
sub deploy
{
my ( $self, $sqlt_args, @args ) = @_;
@@ -119,7 +140,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