Added a use DateTime
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest.pm
index f3418c4..ecd4921 100755 (executable)
@@ -3,6 +3,7 @@ package DBICTest;
 use strict;
 use warnings;
 use base qw/DBIx::Class::Core/;
+use DateTime;
 
 my $db_file = "t/var/DBIxClass.db";
 
@@ -157,6 +158,10 @@ DBICTest::CD->add_relationship(
     { 'foreign.cd' => 'self.cdid' }
 );
 #DBICTest::CD->might_have(liner_notes => 'DBICTest::LinerNotes' => qw/notes/);
+DBICTest::CD->inflate_column( 'year',
+    { inflate => sub { DateTime->new( year => shift ) } },
+    { deflate => sub { shift->year } }
+);
 
 package DBICTest::Artist;