Viciously deal with more strictures fallout
[dbsrgits/DBIx-Class.git] / t / 53lean_startup.t
index 2943507..0c66c7d 100644 (file)
@@ -6,6 +6,9 @@ BEGIN {
   # these envvars *will* bring in more stuff than the baseline
   delete @ENV{qw(DBICTEST_SQLT_DEPLOY DBIC_TRACE)};
 
+  # make sure extras do not load even when this is set
+  $ENV{PERL_STRICTURES_EXTRA} = 1;
+
   unshift @INC, 't/lib';
   require DBICTest::Util::OverrideRequire;
 
@@ -100,6 +103,7 @@ BEGIN {
     Try::Tiny
     Sub::Name
     strictures
+    Sub::Defer
     Sub::Quote
 
     Scalar::Util
@@ -121,6 +125,9 @@ BEGIN {
 {
   register_lazy_loadable_requires(qw(
     Moo
+    Moo::Object
+    Method::Generate::Accessor
+    Method::Generate::Constructor
     Context::Preserve
     Data::Compare
   ));
@@ -167,6 +174,12 @@ BEGIN {
   assert_no_missing_expected_requires();
 }
 
+# make sure we never loaded any of the strictures XS bullshit
+{
+  ok( ! exists $INC{ Module::Runtime::module_notional_filename($_) }, "$_ load never attempted" )
+    for qw(indirect multidimensional bareword::filehandles);
+}
+
 done_testing;
 
 sub register_lazy_loadable_requires {