<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -459,7 +459,7 @@ sub update {
     $obj-&gt;call_trigger('post_save', $orig_obj);
     $obj-&gt;call_trigger('post_update', $orig_obj);
 
-    $orig_obj-&gt;changed_colums({});
+    $orig_obj-&gt;changed_columns({});
     return $rows;
 }
 </diff>
      <filename>lib/Data/ObjectDriver/Driver/DBI.pm</filename>
    </modified>
    <modified>
      <diff>@@ -24,9 +24,9 @@ use warnings;
 use Moose ();
 use Moose::Exporter;
 use Moose::Util::MetaRole;
+use Data::ObjectDriver::Role::Object;
 use Data::ObjectDriver::Moose::Base;
 use Data::ObjectDriver::Role::Meta::Class;
-use Data::ObjectDriver::Role::Object;
 
 Moose::Exporter-&gt;setup_import_methods(
     with_caller =&gt; [ 'columns', 'datasource', 'driver', 'primary_key' ],</diff>
      <filename>lib/Data/ObjectDriver/Moose.pm</filename>
    </modified>
    <modified>
      <diff>@@ -3,9 +3,16 @@ use Carp;
 use Moose::Role;
 use Moose::Util::TypeConstraints;
 
-my $has_changed = sub {
-    my ($instance, $value) = @_;
-    warn &quot;Changing $instance to $value&quot;;
+sub after_has_changed {
+    my $attr = shift;
+    return sub {
+        my ($instance, $value) = @_;
+        #warn &quot;Changing $instance $attr to $value&quot;;
+        # ugly
+        my $changed_columns = $instance-&gt;changed_columns || {};
+        $changed_columns-&gt;{$attr}++;
+        $instance-&gt;changed_columns($changed_columns);
+    }
 };
 
 sub set_columns {
@@ -22,7 +29,7 @@ sub set_columns {
         my %except = map { $_ =&gt; 1 } @{ $_[1] || [] }; 
         my %attributes = %{ $caller-&gt;meta-&gt;get_attribute_map };
         for (keys %attributes) {
-            $meta-&gt;add_after_method_modifier( $_, sub { warn &quot;AFTER&quot;} );
+            $meta-&gt;add_after_method_modifier( $_, after_has_changed($_) );
         }
         my @columns = grep { ! $except{$_} } keys %attributes;
         $meta-&gt;columns( \@columns );</diff>
      <filename>lib/Data/ObjectDriver/Role/Meta/Class.pm</filename>
    </modified>
    <modified>
      <diff>@@ -11,8 +11,8 @@ use Carp ();
 use Data::ObjectDriver::ResultSet;
 
 has changed_columns =&gt; (
-    is =&gt; 'rw',
-    isa =&gt; 'HashRef',
+    is      =&gt; 'rw',
+    isa     =&gt; 'HashRef',
     default =&gt; sub { {} },
 );
 
@@ -541,7 +541,7 @@ sub inflate {
     my($deflated) = @_;
     my $obj = $class-&gt;new;
     $obj-&gt;set_values($deflated-&gt;{columns});
-    $obj-&gt;{changed_cols} = {};
+    $obj-&gt;changed_columns({});
     $obj-&gt;call_trigger('post_inflate');
     return $obj;
 }</diff>
      <filename>lib/Data/ObjectDriver/Role/Object.pm</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ setup_dbs({
 { 
     my $w = Wine-&gt;new;
     ok $w-&gt;name(&quot;name&quot;);
-    use YAML; warn Dump [$w-&gt;primary_key_tuple];
+    ok $w-&gt;is_changed('name');
     dies_ok { $w-&gt;inexistent(&quot;hell&quot;) } &quot;dies on setting inexistent column : 'inexistent()'&quot;;
 }
 
@@ -186,8 +186,7 @@ setup_dbs({
     #$r-&gt;refresh;
     my $id = $r-&gt;recipe_id;
     $r-&gt;title('replaced');
-    $r-&gt;recipe_id(&quot;lamer&quot;);
-    dies_ok { $r-&gt;replace };
+    dies_ok { $r-&gt;recipe_id(&quot;lamer&quot;) };
     $r = Recipe-&gt;lookup($id);
     ok $r;
     is $r-&gt;title, &quot;to replace&quot;;
@@ -197,8 +196,7 @@ setup_dbs({
         no warnings 'redefine';
         local *Data::ObjectDriver::Driver::DBD::SQLite::can_replace = sub { 0 };
         $r-&gt;title('replaced');
-        $r-&gt;recipe_id(&quot;lamer&quot;);
-        dies_ok { $r-&gt;replace };
+        dies_ok { $r-&gt;recipe_id(&quot;lamer&quot;) };
         $r = Recipe-&gt;lookup($id);
         ok $r;
         is $r-&gt;title, &quot;to replace&quot;;</diff>
      <filename>t/02-moose.t</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ use Moose::Util::TypeConstraints;
 
 subtype 'vchar'
     =&gt; as Str
-    =&gt; where { defined($_) &amp;&amp; bytes::length($_) &lt; 255 }
+    =&gt; where { use bytes; defined($_) &amp;&amp; bytes::length($_) &lt; 255 }
     =&gt; message { &quot;The vchar you provided shouldn't exceed 255 char&quot; };
 
 has id        =&gt; ( isa =&gt; 'Int', is =&gt; 'rw' );</diff>
      <filename>t/lib/moose/Ingredient.pm</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c4f28b13920e768470d20fe15b1cf9ced5ef69f8</id>
    </parent>
  </parents>
  <author>
    <name>Yann Kerherve</name>
    <email>yann@cyberion.net</email>
  </author>
  <url>http://github.com/yannk/perl-data-objectdriver/commit/610820d7c11b6c6e2706681905a861e428b41898</url>
  <id>610820d7c11b6c6e2706681905a861e428b41898</id>
  <committed-date>2009-04-06T14:42:51-07:00</committed-date>
  <authored-date>2009-04-06T14:42:51-07:00</authored-date>
  <message>Very ugly but works now, thanks to the help I got from #moose</message>
  <tree>8facdf47c17ebbde0a5f1a6e89bc63f8f4e45a2c</tree>
  <committer>
    <name>Yann Kerherve</name>
    <email>yann@cyberion.net</email>
  </committer>
</commit>
