diff options
author | David Mitchell <davem@iabyn.com> | 2017-04-07 12:39:53 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-04-07 14:42:24 +0100 |
commit | 2e6f1ae9c4f7857e86f85fde07fe1af1254c4600 (patch) | |
tree | 3ba35a262ee061586a2b7a975194dc3f858d6568 /win32 | |
parent | 24263f7d0899237e9133f040d7554d932e4cc397 (diff) | |
download | perl-2e6f1ae9c4f7857e86f85fde07fe1af1254c4600.tar.gz |
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.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/ce-helpers/makedist.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/ce-helpers/makedist.pl b/win32/ce-helpers/makedist.pl index 2ad0f70c9f..daf4f3e96c 100644 --- a/win32/ce-helpers/makedist.pl +++ b/win32/ce-helpers/makedist.pl @@ -237,6 +237,7 @@ sub bootstrap { my $bs = $file; $bs =~ s/(\.\w+)?(;\d*)?$/\.bs/; if (-s $bs) { # only read file if it's not empty + local @INC = ('.'); do $bs; warn "$bs: $@\n" if $@; } |