This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Further simplify XSLoader .bs file handling
[perl5.git] / dist / XSLoader / XSLoader_pm.PL
index 1549f03..e095388 100644 (file)
@@ -6,12 +6,12 @@ eval { require DynaLoader };
 1 while unlink "XSLoader.pm";
 open OUT, '>', 'XSLoader.pm' or die $!;
 print OUT <<'EOT';
-# Generated from XSLoader.pm.PL (resolved %Config::Config value)
+# Generated from XSLoader_pm.PL (resolved %Config::Config value)
 # This file is unique for every OS
 
 package XSLoader;
 
-$VERSION = "0.26";
+$VERSION = "0.28";
 
 #use strict;
 
@@ -143,14 +143,8 @@ print OUT <<'EOT';
     my $bs = $file;
     $bs =~ s/(\.\w+)?(;\d*)?$/\.bs/; # look for .bs 'beside' the library
 
-    if (-s $bs) { # only read file if it's not empty
-#       print STDERR "BS: $bs ($^O, $dlsrc)\n" if $dl_debug;
-        eval { do $bs; };
-        warn "$bs: $@\n" if $@;
-       goto \&XSLoader::bootstrap_inherit;
-    }
-
-    goto \&XSLoader::bootstrap_inherit if not -f $file;
+    # This calls DynaLoader::bootstrap, which will load the .bs file if present
+    goto \&XSLoader::bootstrap_inherit if not -f $file or -s $bs;
 
     my $bootname = "boot_$module";
     $bootname =~ s/\W/_/g;