[Bast-commits] r9225 - DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class

oliver at dev.catalyst.perl.org oliver at dev.catalyst.perl.org
Mon Apr 26 21:06:13 GMT 2010


Author: oliver
Date: 2010-04-26 22:06:13 +0100 (Mon, 26 Apr 2010)
New Revision: 9225

Modified:
   DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Journal.pm
Log:
change order for update processing to store new row data rather than previous row data

Modified: DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Journal.pm
===================================================================
--- DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Journal.pm	2010-04-26 20:57:43 UTC (rev 9224)
+++ DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Journal.pm	2010-04-26 21:06:13 UTC (rev 9225)
@@ -8,7 +8,7 @@
 our $VERSION = '0.900001_04';
 $VERSION = eval $VERSION; # no errors in dev versions
 
-## On create/insert, add new entry to AuditLog
+## On create/insert, add new entry to AuditLog and new content to AuditHistory
 
 sub _journal_schema {
     my $self = shift;
@@ -17,11 +17,9 @@
 
 sub insert {
     my ($self, @args) = @_;
-
     return if $self->in_storage;
 
     my $res = $self->next::method(@args);
-
     $self->journal_log_insert;
 
     return $res;
@@ -55,12 +53,12 @@
     }
 }
 
-## On update, copy previous row's contents to AuditHistory
+## On update, copy row's new contents to AuditHistory
 
 sub update {
     my $self = shift;
-    $self->journal_log_update(@_);
     $self->next::method(@_);
+    $self->journal_log_update(@_);
 }
 
 sub journal_log_update {




More information about the Bast-commits mailing list