When a .bs file is found, XSLoader::load() falls back to
DynalLoader::bootstrap() which will load it, so there's no need to do
it twice.
package XSLoader;
-$VERSION = "0.27";
+$VERSION = "0.28";
#use strict;
if (-s $bs) { # only read file if it's not empty
# print STDERR "BS: $bs ($^O, $dlsrc)\n" if $dl_debug;
- eval { local @INC = ('.'); do $bs; };
- warn "$bs: $@\n" if $@;
+ # This calls DynaLoader::bootstrap, which loads the .bs file
goto \&XSLoader::bootstrap_inherit;
}
#
-# test that non-empty .bs files get executed
+# test that non-empty .bs files get executed (but only once)
$bscode = <<'EOF';
-$::bs_file_got_executed = 1;
+$::bs_file_got_executed++;
EOF
use Test::More;
use XS::APItest;
-is $::bs_file_got_executed, 1, "BS file was executed";
+is $::bs_file_got_executed, 1, "BS file was executed once";
done_testing();