Introducing DBIx::Class::Schema::SanityChecker
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / DBIC / Test / SQLite.pm
index 72aa0c1..87a17f2 100644 (file)
@@ -43,6 +43,23 @@ use DBICTest;
 
 use base qw/DBIx::Class/;
 
+BEGIN {
+  # offset the warning from DBIx::Class::Schema on 5.8
+  # keep the ::Schema default as-is otherwise
+  DBIx::Class::_ENV_::OLD_MRO
+    and
+  ( eval <<'EOS' or die $@ );
+
+  sub setup_schema_instance {
+    my $s = shift->next::method(@_);
+    $s->schema_sanity_checker('');
+    $s;
+  }
+
+  1;
+EOS
+}
+
 __PACKAGE__->load_components(qw/CDBICompat Core DB/);
 
 my $DB = DBICTest->_sqlite_dbfilename;