# 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;
CORE::require('Test/More.pm');
Test::More::fail ("Unexpected require of '$req' by $caller[0] ($caller[1] line $caller[2])");
- if ($ENV{TEST_VERBOSE}) {
+ if ( $ENV{TEST_VERBOSE} or ! DBICTest::RunMode->is_plain ) {
CORE::require('DBICTest/Util.pm');
Test::More::diag( 'Require invoked' . DBICTest::Util::stacktrace() );
}
namespace::clean
Try::Tiny
Sub::Name
+ strictures
+ Sub::Defer
+ Sub::Quote
Scalar::Util
List::Util
- Data::Compare
+ Storable
Class::Accessor::Grouped
Class::C3::Componentised
+ SQL::Abstract
));
require DBICTest::Schema;
{
register_lazy_loadable_requires(qw(
Moo
- Sub::Quote
+ Moo::Object
+ Method::Generate::Accessor
+ Method::Generate::Constructor
Context::Preserve
));
{
register_lazy_loadable_requires(qw(
DBI
- SQL::Abstract
Hash::Merge
));
# and do full populate() as well, just in case - shouldn't add new stuff
{
- require DBICTest;
+ local $ENV{DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER};
+ {
+ # in general we do not want DBICTest to load before sqla, but it is
+ # ok to cheat here
+ local $INC{'SQL/Abstract.pm'};
+ require DBICTest;
+ }
my $s = DBICTest->init_schema;
is ($s->resultset('Artist')->find(1)->name, 'Caterwauler McCrae');
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 {