warnings go byebye
Matt S Trout [Tue, 3 Jul 2007 01:44:17 +0000 (01:44 +0000)]
lib/DBIx/Class/Schema/Journal.pm
lib/DBIx/Class/Schema/Journal/DB/AuditHistory.pm
lib/DBIx/Class/Schema/Journal/DB/AuditLog.pm

index f1a8a14..21a4815 100644 (file)
@@ -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});
index 1be108f..dbfacf1 100644 (file)
@@ -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);
index b55a35a..a28af3d 100644 (file)
@@ -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);