From: Matt S Trout Date: Tue, 3 Jul 2007 01:44:17 +0000 (+0000) Subject: warnings go byebye X-Git-Tag: v0.900201~99 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5c237df399ef82605f3464e6fe983bc09263dd8;p=dbsrgits%2FDBIx-Class-Journal.git warnings go byebye --- diff --git a/lib/DBIx/Class/Schema/Journal.pm b/lib/DBIx/Class/Schema/Journal.pm index f1a8a14..21a4815 100644 --- a/lib/DBIx/Class/Schema/Journal.pm +++ b/lib/DBIx/Class/Schema/Journal.pm @@ -61,7 +61,9 @@ sub connection $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; + my %j_sources = map { $_ => 1 } $self->journal_sources + ? @{$self->journal_sources} + : $self->sources; foreach my $s_name ($self->sources) { next unless($j_sources{$s_name}); diff --git a/lib/DBIx/Class/Schema/Journal/DB/AuditHistory.pm b/lib/DBIx/Class/Schema/Journal/DB/AuditHistory.pm index 1be108f..dbfacf1 100644 --- a/lib/DBIx/Class/Schema/Journal/DB/AuditHistory.pm +++ b/lib/DBIx/Class/Schema/Journal/DB/AuditHistory.pm @@ -18,7 +18,7 @@ sub new $data->{change} = { # ID => \'DEFAULT', changeset_id => $source->schema->current_changeset, - %{$data->{change}}, + %{$data->{change}||{}}, }; $self->next::method($data, @rest); diff --git a/lib/DBIx/Class/Schema/Journal/DB/AuditLog.pm b/lib/DBIx/Class/Schema/Journal/DB/AuditLog.pm index b55a35a..a28af3d 100644 --- a/lib/DBIx/Class/Schema/Journal/DB/AuditLog.pm +++ b/lib/DBIx/Class/Schema/Journal/DB/AuditLog.pm @@ -33,7 +33,7 @@ sub new # ID => \'DEFAULT', # ID => 1, changeset_id => $source->schema->current_changeset, - %{$data->{created}}, + %{$data->{created}||{}}, }; $self->next::method($data, @rest);