# exclude our test suite, known "module require-rs" and eval frames
$caller[1] =~ / (?: \A | [\/\\] ) x?t [\/\\] /x
or
- $caller[0] =~ /^ (?: base | parent | Class::C3::Componentised | Module::Inspector | Module::Runtime ) $/x
+ $caller[0] =~ /^ (?: base | parent | Class::C3::Componentised | Module::Inspector | Module::Runtime | DBIx::Class::Optional::Dependencies ) $/x
or
$caller[3] eq '(eval)',
)
return $res if $req =~ /^DBIx::Class|^DBICTest::/;
- # FIXME - work around RT#114641
- #
- # Because *OF COURSE* when (questionable) unicode tests fail on < 5.8
- # the answer is to make the entire module 5.8 only, instead of skipping
- # the tests in question
- # rjbs-- # thinly veiled passive aggressive bullshit
- #
- # The actual skip is needed because the use happens before 'package' had
- # a chance to switch the namespace, so the shim thinks DBIC::Schema tried
- # to require this
- return $res if $req eq '5.008';
-
- # exclude everything where the current namespace does not match the called function
- # (this works around very weird XS-induced require callstack corruption)
+ # Some modules have a bare 'use $perl_version' as the first statement
+ # Since the use() happens before 'package' had a chance to switch
+ # the namespace, the shim thinks DBIC* tried to require this
+ return $res if $req =~ /^v?[0-9.]+$/;
+
if (
!$initial_inc_contents->{$req}
and
@caller
and
$caller[0] =~ /^DBIx::Class/
- and
- (CORE::caller($up))[3] =~ /\Q$caller[0]/
) {
local $stack{neutralize_override} = 1;
- do 1 while CORE::caller(++$up);
+ # find last-most frame, to feed to T::B below
+ while( CORE::caller(++$up) ) { 1 }
require('Test/More.pm');
local $Test::Builder::Level = $up + 1;
+
+ # work around the trainwreck that is https://github.com/doy/package-stash-xs/pull/4
+ local $::TODO = 'sigh' if (
+ $INC{'Package/Stash/XS.pm'}
+ and
+ $req eq 'utf8'
+ );
+
Test::More::fail ("Unexpected require of '$req' by $caller[0] ($caller[1] line $caller[2])");
- require('DBICTest/Util.pm');
- Test::More::diag( 'Require invoked' . DBICTest::Util::stacktrace() );
+ unless( $::TODO ) {
+ require('DBICTest/Util.pm');
+ Test::More::diag( 'Require invoked' . DBICTest::Util::stacktrace() );
+ }
}
return $res;
DBICTEST_DEBUG_CONCURRENCY_LOCKS
)};
+ # ensures the checker won't be disabled in
+ # t/lib/DBICTest/BaseSchema.pm
+ $ENV{DBIC_ASSERT_NO_FAILING_SANITY_CHECKS} = 1;
+
$ENV{DBICTEST_ANFANG_DEFANG} = 1;
# make sure extras do not load even when this is set
Carp
namespace::clean
- Try::Tiny
Sub::Name
Sub::Defer
Sub::Quote
attributes
- File::Spec
Scalar::Util
Storable
Class::C3::Componentised
));
+ # load Storable ourselves here - there are too many
+ # variations with DynaLoader and XSLoader making testing
+ # for it rather unstable
+ require Storable;
+
require DBIx::Class::Schema;
assert_no_missing_expected_requires();
}
register_lazy_loadable_requires(qw(
DBI
Hash::Merge
+ Data::Dumper
));
{