Explicitly normalize results of relationship resolution
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / MyBase.pm
index 1fe9317..106b359 100644 (file)
@@ -5,10 +5,25 @@ use warnings;
 use strict;
 
 use DBI;
-
-use lib 't/lib';
 use DBICTest;
 
+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
+}
+
 use base qw(DBIx::Class::CDBICompat);
 
 my @connect = (@ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/}, { PrintError => 0});