+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
use strict;
-use Test::More;
+use warnings;
-BEGIN {
- eval "use DBIx::Class::CDBICompat;";
- plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@")
- : (tests=> 3);
-}
+use Test::More;
-INIT {
- use lib 't/cdbi/testlib';
- use Film;
-}
+use lib 't/cdbi/testlib';
+use Film;
for my $title ("Bad Taste", "Braindead", "Forgotten Silver") {
Film->insert({ Title => $title, Director => 'Peter Jackson' });
is @films, 2, "retrieve_from_sql with LIMIT";
is( $_->director, "Peter Jackson" ) for @films;
}
+
+done_testing;