This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix and test execution of non-empty .bs files
During the build of XS modules, an empty Foo.bs file is normally created
for each Foo.so file. If a Foo_BS file is present, instead this triggers
the auto-generatation of a .bs file which may have executable perl
content.
However, nothing in core currently generates a non-empty .bs file. So add
a test that this mechanism works, and fix up the three dynamic lib loaders
which implement the 'do $bs if -s $bs' mechanism to not rely on the
process having '.' present in @INC.
As it happens this already works currently, because the name of the
.bs file to load will usually be something like
../../lib/auto/Foo/Foo.bs
and the presence of the leading '..' causes 'do' to load the file directly
rather than via @INC. But locally fix up @INC anyway, in case '../' isn't
always the case.