[Bast-commits] r6909 - DBIx-Class/0.08/trunk/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Jul 1 11:27:16 GMT 2009
Author: ribasushi
Date: 2009-07-01 11:27:15 +0000 (Wed, 01 Jul 2009)
New Revision: 6909
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
Log:
Optimize set_column on uninserted objects
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2009-07-01 11:26:01 UTC (rev 6908)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2009-07-01 11:27:15 UTC (rev 6909)
@@ -787,9 +787,12 @@
$self->store_column($column, $new_value);
my $dirty;
- if (defined $old_value xor defined $new_value) {
+ if (!$self->in_storage) { # no point tracking dirtyness on uninserted data
$dirty = 1;
}
+ elsif (defined $old_value xor defined $new_value) {
+ $dirty = 1;
+ }
elsif (not defined $old_value) { # both undef
$dirty = 0;
}
More information about the Bast-commits
mailing list