- Fix the synopsis for DBIC::Storage::DBI. ->datetime_parser returns a class,
Bryan Beeley [Fri, 2 Apr 2010 19:31:34 +0000 (19:31 +0000)]
  so you need to call a method on it in order to transform a DateTime object

lib/DBIx/Class/Storage/DBI.pm

index a7abffb..1030c4c 100644 (file)
@@ -93,7 +93,7 @@ DBIx::Class::Storage::DBI - DBI storage handler
   );
 
   $schema->resultset('Book')->search({
-     written_on => $schema->storage->datetime_parser(DateTime->now)
+     written_on => $schema->storage->datetime_parser->format_datetime(DateTime->now)
   });
 
 =head1 DESCRIPTION