9 plan skip_all => "DateTime required" unless eval { require DateTime };
10 eval "use DateTime::Format::Strptime";
11 plan skip_all => 'DateTime::Format::Strptime required' if $@;
15 my $schema = DBICTest->init_schema();
16 my $artist_rs = $schema->resultset('Artist');
17 my $cd_rs = $schema->resultset('CD');
22 $cd = $cd_rs->search({ year => {'=' => 1999}})->create
24 artist => {name => 'Guillermo1'},
25 title => 'Guillermo 1',
32 my $formatter = DateTime::Format::Strptime->new(pattern => '%Y');
33 my $dt = DateTime->new(year => 2006, month => 06, day => 06,
34 formatter => $formatter );
37 $cd = $cd_rs->search({ year => $dt})->create
39 artist => {name => 'Guillermo2'},
40 title => 'Guillermo 2',
50 $artist = $artist_rs->search({ name => {'!=' => 'Killer'}})
51 ->create({artistid => undef});
53 is($artist->name, undef);
60 $artist = $artist_rs->search({ name => [ q/ some stupid names here/]})
61 ->create({artistid => undef});
63 is($artist->name, undef);