<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,6 +4,12 @@ Revision history for Perl module Git::PurePerl:
      - allow subdirectories in .git/refs/*/ (thanks to martijn)
      - run protocol.t test with --base-path to not care about where
        on the filesystem the checkout is (thanks to martijn)
+     - when parsing a commit, split up the author and committer
+       fields into name, email and commit time. This adds two new
+       DateTime fields, authored_time and committed_time to ::Commit
+       and changes the type of the author and committer fields to
+       Git::PurePerl::Actor, which is an object with name and
+       email fields (thanks to martijn)
 
 0.40 Fri Mar 13 15:29:02 GMT 2009
      - Skip protocol tests on Win32 (thanks to fayland)</diff>
      <filename>CHANGES</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,7 @@ WriteMakefile(
         'Compress::Raw::Zlib'        =&gt; '0',
         'Compress::Zlib'             =&gt; '0',
         'Data::Stream::Bulk'         =&gt; '0',
+        'DateTime'                   =&gt; '0',
         'Digest::SHA1'               =&gt; '0',
         'File::Find::Rule'           =&gt; '0',
         'IO::Digest',                =&gt; '0',</diff>
      <filename>Makefile.PL</filename>
    </modified>
    <modified>
      <diff>@@ -6,8 +6,10 @@ use Compress::Zlib qw(uncompress);
 use Data::Stream::Bulk;
 use Data::Stream::Bulk::Array;
 use Data::Stream::Bulk::Path::Class;
+use DateTime;
 use Digest::SHA1;
 use File::Find::Rule;
+use Git::PurePerl::Actor;
 use Git::PurePerl::DirectoryEntry;
 use Git::PurePerl::Loose;
 use Git::PurePerl::Object;</diff>
      <filename>lib/Git/PurePerl.pm</filename>
    </modified>
    <modified>
      <diff>@@ -8,15 +8,20 @@ has 'kind' =&gt;
     ( is =&gt; 'ro', isa =&gt; 'ObjectKind', required =&gt; 1, default =&gt; 'commit' );
 has 'tree_sha1'   =&gt; ( is =&gt; 'rw', isa =&gt; 'Str', required =&gt; 0 );
 has 'parent_sha1' =&gt; ( is =&gt; 'rw', isa =&gt; 'Str', required =&gt; 0 );
-has 'author'      =&gt; ( is =&gt; 'rw', isa =&gt; 'Str', required =&gt; 0 );
-has 'committer'   =&gt; ( is =&gt; 'rw', isa =&gt; 'Str', required =&gt; 0 );
-has 'comment'     =&gt; ( is =&gt; 'rw', isa =&gt; 'Str', required =&gt; 0 );
+has 'author' =&gt; ( is =&gt; 'rw', isa =&gt; 'Git::PurePerl::Actor', required =&gt; 0 );
+has 'authored_time' =&gt; ( is =&gt; 'rw', isa =&gt; 'DateTime', required =&gt; 0 );
+has 'committer' =&gt;
+    ( is =&gt; 'rw', isa =&gt; 'Git::PurePerl::Actor', required =&gt; 0 );
+has 'committed_time' =&gt; ( is =&gt; 'rw', isa =&gt; 'DateTime', required =&gt; 0 );
+has 'comment'        =&gt; ( is =&gt; 'rw', isa =&gt; 'Str',      required =&gt; 0 );
 
 __PACKAGE__-&gt;meta-&gt;make_immutable;
 
 my %method_map = (
-    'tree'   =&gt; 'tree_sha1',
-    'parent' =&gt; 'parent_sha1',
+    'tree'      =&gt; 'tree_sha1',
+    'parent'    =&gt; 'parent_sha1',
+    'author'    =&gt; 'authored_time',
+    'committer' =&gt; 'committed_time'
 );
 
 sub BUILD {
@@ -26,8 +31,22 @@ sub BUILD {
     while ( my $line = shift @lines ) {
         last unless $line;
         my ( $key, $value ) = split ' ', $line, 2;
-        $key = $method_map{$key} || $key;
-        $self-&gt;$key($value);
+        if ( $key eq 'committer' or $key eq 'author' ) {
+            my @data = split ' ', $value;
+            my ( $email, $epoch, $tz ) = splice( @data, -3 );
+            $email = substr( $email, 1, -1 );
+            my $name = join ' ', @data;
+            my $actor
+                = Git::PurePerl::Actor-&gt;new( name =&gt; $name, email =&gt; $email );
+            $self-&gt;$key($actor);
+            $key = $method_map{$key};
+            my $dt
+                = DateTime-&gt;from_epoch( epoch =&gt; $epoch, time_zone =&gt; $tz );
+            $self-&gt;$key($dt);
+        } else {
+            $key = $method_map{$key} || $key;
+            $self-&gt;$key($value);
+        }
     }
     $self-&gt;comment( join &quot;\n&quot;, @lines );
 }</diff>
      <filename>lib/Git/PurePerl/Object/Commit.pm</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ BEGIN {
     if ( $^O eq 'MSWin32' ) {
         plan skip_all =&gt; 'Windows does NOT have git-daemon yet';
     }
-    plan tests =&gt; 12;
+    plan tests =&gt; 14;
 }
 use Git::PurePerl;
 use IO::File;
@@ -36,8 +36,8 @@ is( $commit-&gt;size, 256 );
 like( $commit-&gt;sha1, qr/^[a-z0-9]{40}$/ );
 is( $commit-&gt;tree_sha1, '37b4fcd62571f07408e830f455268891f95cecf5' );
 like( $commit-&gt;parent_sha1, qr/^[a-z0-9]{40}$/ );
-like( $commit-&gt;author,
-    qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-like( $commit-&gt;committer,
-    qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-is( $commit-&gt;comment, 'add again' );
+is( $commit-&gt;author-&gt;name,     'Your Name Comes Here' );
+is( $commit-&gt;author-&gt;email,    'you@yourdomain.example.com' );
+is( $commit-&gt;committer-&gt;name,  'Your Name Comes Here' );
+is( $commit-&gt;committer-&gt;email, 'you@yourdomain.example.com' );
+is( $commit-&gt;comment,          'add again' );</diff>
      <filename>t/protocol.t</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #!perl
 use strict;
 use warnings;
-use Test::More tests =&gt; 186;
+use Test::More tests =&gt; 198;
 use Git::PurePerl;
 use Path::Class;
 
@@ -18,11 +18,13 @@ foreach my $directory qw(test-project test-project-packs test-project-packs2)
     like( $commit-&gt;sha1, qr/^[a-z0-9]{40}$/ );
     is( $commit-&gt;tree_sha1, '37b4fcd62571f07408e830f455268891f95cecf5' );
     like( $commit-&gt;parent_sha1, qr/^[a-z0-9]{40}$/ );
-    like( $commit-&gt;author,
-        qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-    like( $commit-&gt;committer,
-        qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-    is( $commit-&gt;comment, 'add again' );
+    isa_ok( $commit-&gt;author,    'Git::PurePerl::Actor' );
+    isa_ok( $commit-&gt;committer, 'Git::PurePerl::Actor' );
+    is( $commit-&gt;author-&gt;name,    'Your Name Comes Here' );
+    is( $commit-&gt;committer-&gt;name, 'Your Name Comes Here' );
+    isa_ok( $commit-&gt;authored_time, 'DateTime' );
+    is( $commit-&gt;authored_time-&gt;month, 11 );
+    is( $commit-&gt;comment,              'add again' );
 
     my $tree = $commit-&gt;tree;
     is( $tree-&gt;kind, 'tree' );
@@ -48,11 +50,9 @@ hello world, again
     like( $commit-&gt;sha1, qr/^[a-z0-9]{40}$/ );
     is( $commit-&gt;tree_sha1, 'd0492b368b66bdabf2ac1fd8c92b39d3db916e59' );
     like( $commit-&gt;parent_sha1, qr/^[a-z0-9]{40}$/ );
-    like( $commit-&gt;author,
-        qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-    like( $commit-&gt;committer,
-        qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-    is( $commit-&gt;comment, 'add emphasis' );
+    is( $commit-&gt;author-&gt;email,    'you@yourdomain.example.com' );
+    is( $commit-&gt;committer-&gt;email, 'you@yourdomain.example.com' );
+    is( $commit-&gt;comment,          'add emphasis' );
 
     $tree = $commit-&gt;tree;
     is( $tree-&gt;kind, 'tree' );
@@ -75,14 +75,12 @@ hello world, again
     is( $commit-&gt;kind, 'commit' );
     is( $commit-&gt;size, 213 );
     like( $commit-&gt;sha1, qr/^[a-z0-9]{40}$/ );
-    is( $commit-&gt;tree_sha1,   '92b8b694ffb1675e5975148e1121810081dbdffe' );
-    is( $commit-&gt;parent_sha1, undef );
-    is( $commit-&gt;parent,      undef );
-    like( $commit-&gt;author,
-        qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-    like( $commit-&gt;committer,
-        qr/^Your Name Comes Here &lt;you\@yourdomain.example.com&gt;/ );
-    is( $commit-&gt;comment, 'initial commit' );
+    is( $commit-&gt;tree_sha1,    '92b8b694ffb1675e5975148e1121810081dbdffe' );
+    is( $commit-&gt;parent_sha1,  undef );
+    is( $commit-&gt;parent,       undef );
+    is( $commit-&gt;author-&gt;name, 'Your Name Comes Here' );
+    is( $commit-&gt;committer-&gt;name, 'Your Name Comes Here' );
+    is( $commit-&gt;comment,         'initial commit' );
 
     $tree = $commit-&gt;tree;
     is( $tree-&gt;kind, 'tree' );</diff>
      <filename>t/simple.t</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>585d0999474c5eba073b540ad3c173176eb56cf7</id>
    </parent>
  </parents>
  <author>
    <name>Leon Brocard</name>
    <email>acme@astray.com</email>
  </author>
  <url>http://github.com/acme/git-pureperl/commit/5de67af6e23d1456842b829cc06c34f76e1ada21</url>
  <id>5de67af6e23d1456842b829cc06c34f76e1ada21</id>
  <committed-date>2009-04-21T12:03:27-07:00</committed-date>
  <authored-date>2009-04-21T12:03:27-07:00</authored-date>
  <message>when parsing a commit, split up the author and committer fields into name, email and commit time. This adds two new DateTime fields, authored_time and committed_time to ::Commit and changes the type of the author and committer fields to Git::PurePerl::Actor, which is an object with name and email fields (thanks to martijn)</message>
  <tree>040ff8b79e23daef121fefb895e80b423435bc54</tree>
  <committer>
    <name>Leon Brocard</name>
    <email>acme@astray.com</email>
  </committer>
</commit>
