From: Jess Robinson Date: Thu, 3 May 2007 14:24:31 +0000 (+0000) Subject: bug testing.. X-Git-Tag: v0.900201~107 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a5222e789deb486272f848c6739b88381fe2bde9;p=dbsrgits%2FDBIx-Class-Journal.git bug testing.. --- diff --git a/lib/DBIx/Class/Schema/Journal.pm b/lib/DBIx/Class/Schema/Journal.pm index 319477a..72d8881 100644 --- a/lib/DBIx/Class/Schema/Journal.pm +++ b/lib/DBIx/Class/Schema/Journal.pm @@ -16,15 +16,17 @@ sub connection my $self = shift; $self->next::method(@_); + print STDERR join(":", $self->sources), "\n"; + my $journal_schema = DBIx::Class::Schema::Journal::DB->connect(@{ $self->journal_connection || $self->storage->connect_info }); - print STDERR "conn", $journal_schema->storage->connect_info; +# print STDERR "conn", $journal_schema->storage->connect_info; if($self->journal_storage_type) { $journal_schema->storage_type($self->journal_storage_type); } ## get our own private version of the journaling sources - $self->_journal_schema($journal_schema->compose_namespace(blessed($self) . '::Journal')); + $self->_journal_schema($journal_schema->compose_namespace(blessed($self) . '::Journal')); ## Create auditlog+history per table my %j_sources = @{$self->journal_sources} ? map { $_ => 1 } @{$self->journal_sources} : map { $_ => 1 } $self->sources; @@ -33,7 +35,7 @@ sub connection next unless($j_sources{$s_name}); $self->create_journal_for($s_name); $self->class($s_name)->load_components('Journal'); - print STDERR "$s_name :", $self->class($s_name), "\n"; +# print STDERR "$s_name :", $self->class($s_name), "\n"; } ## Set up relationship between changeset->user_id and this schema's user diff --git a/t/lib/DBICTest/Schema.pm b/t/lib/DBICTest/Schema.pm index 7349619..5300475 100644 --- a/t/lib/DBICTest/Schema.pm +++ b/t/lib/DBICTest/Schema.pm @@ -8,7 +8,8 @@ __PACKAGE__->load_components(qw/+DBIx::Class::Schema::Journal/); __PACKAGE__->journal_user(['DBICTest::Schema::Artist', {'foreign.artistid' => 'self.user_id'}]); no warnings qw/qw/; -__PACKAGE__->load_classes(qw/ +DBICTest::Schema->load_classes( +qw/ Artist CD Track