# Perl 5.8.0 doesn't have utf8::is_utf8()
requires 'Encode' => 0 if ($] <= 5.008000);
-test_requires 'DBD::SQLite' => 1.13;
+test_requires 'DBD::SQLite' => 1.14;
test_requires 'Test::Builder' => 0.33;
test_requires 'Test::Warn' => 0.11;
test_requires 'Test::Exception' => 0;
use strict;
-use warnings;
-
+use warnings;
use Test::More;
-use lib qw(t/lib);
-use DBICTest;
-my $schema = DBICTest->init_schema();
+BEGIN {
+ eval "use DBIx::Class::CDBICompat;";
+ plan skip_all => "Class::Trigger and DBIx::ContextualFetch required"
+ if $@;
-eval { require DateTime };
-plan skip_all => "Need DateTime for inflation tests" if $@;
+ eval { require DateTime };
+ plan skip_all => "Need DateTime for inflation tests" if $@;
-eval { require Clone };
-plan skip_all => "Need Clone for CDBICompat inflation tests" if $@;
+ eval { require Clone };
+ plan skip_all => "Need Clone for CDBICompat inflation tests" if $@;
+}
plan tests => 6;
+use lib qw(t/lib);
+use DBICTest;
+
+my $schema = DBICTest->init_schema();
+
DBICTest::Schema::CD->load_components(qw/CDBICompat::Relationships/);
DBICTest::Schema::CD->has_a( 'year', 'DateTime',