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
authorDavid Mitchell <davem@iabyn.com>
Fri, 7 Apr 2017 11:39:53 +0000 (12:39 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 7 Apr 2017 13:42:24 +0000 (14:42 +0100)
commit2e6f1ae9c4f7857e86f85fde07fe1af1254c4600
tree3ba35a262ee061586a2b7a975194dc3f858d6568
parent24263f7d0899237e9133f040d7554d932e4cc397
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.
MANIFEST
dist/XSLoader/XSLoader_pm.PL
ext/DynaLoader/DynaLoader_pm.PL
ext/XS-APItest/APItest_BS [new file with mode: 0644]
ext/XS-APItest/t/bootstrap.t [new file with mode: 0644]
win32/ce-helpers/makedist.pl