in reply to Re^2: Breaking XS for testing? (@INC code ref)
in thread Breaking XS for testing?
I was assuming a sane "fallback if no XS version available" scheme such as I've seen many times, where something like Scalar::Util_XS is a separate module that is only optionally installed. But Scalar::Util doesn't use this level of sanity and instead implements a lot of special installation machinery in order to allow it to install just parts of itself, so you have to learn its own flavor of magic in order to deal with it.
It looks like overriding DynaLoader::bootstrap() would suffice:
require Dynaloader; my $orig= \&DynaLoader::bootstrap; *DynaLoader::bootstrap= sub { ... };
- tye
|
|---|