eval { require DynaLoader };
1 while unlink "XSLoader.pm";
-open OUT, ">XSLoader.pm" or die $!;
+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.21";
+$VERSION = "0.28";
#use strict;
my $modpname = join('/',@modparts);
my $c = () = split(/::/,$caller,-1);
$modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
+EOT
+
+my $to_print = <<'EOT';
# Does this look like a relative path?
- if ($modlibname !~ m|^[\\/]|) {
+ if ($modlibname !~ m{regexp}) {
+EOT
+
+$to_print =~ s~regexp~
+ $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'cygwin' || $^O eq 'amigaos'
+ ? '^(?:[A-Za-z]:)?[\\\/]' # Optional drive letter
+ : '^/'
+~e;
+
+print OUT $to_print, <<'EOT';
# Someone may have a #line directive that changes the file name, or
# may be calling XSLoader::load from inside a string eval. We cer-
# tainly do not want to go loading some code that is not in @INC,
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;
=head1 VERSION
-Version 0.17
+Version 0.24
=head1 SYNOPSIS