summaryrefslogtreecommitdiff
path: root/dist/XSLoader
diff options
context:
space:
mode:
Diffstat (limited to 'dist/XSLoader')
-rw-r--r--dist/XSLoader/Makefile.PL8
-rw-r--r--dist/XSLoader/XSLoader_pm.PL26
2 files changed, 28 insertions, 6 deletions
diff --git a/dist/XSLoader/Makefile.PL b/dist/XSLoader/Makefile.PL
index bb92d84253..111d85ad54 100644
--- a/dist/XSLoader/Makefile.PL
+++ b/dist/XSLoader/Makefile.PL
@@ -34,10 +34,12 @@ my $installdirs = $] < 5.011 ? "perl" : "site";
WriteMakefile(
NAME => $PACKAGE,
- LICENSE => 'perl',
- AUTHOR => 'Sebastien Aperghis-Tramoni <sebastien@aperghis.net>',
+ ($ExtUtils::MakeMaker::VERSION > 6.30 ?
+ (LICENSE => 'perl',
+ AUTHOR => 'Sebastien Aperghis-Tramoni <sebastien@aperghis.net>',
+ ABSTRACT_FROM => 'XSLoader_pm.PL',
+ ) : ()),
VERSION_FROM => 'XSLoader_pm.PL',
- ABSTRACT_FROM => 'XSLoader_pm.PL',
INSTALLDIRS => $installdirs,
PL_FILES => { 'XSLoader_pm.PL' => 'XSLoader.pm' },
PM => { 'XSLoader.pm' => '$(INST_ARCHLIB)/XSLoader.pm' },
diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL
index 64ebcc215d..98a19eaa51 100644
--- a/dist/XSLoader/XSLoader_pm.PL
+++ b/dist/XSLoader/XSLoader_pm.PL
@@ -8,15 +8,35 @@ print OUT <<'EOT';
package XSLoader;
-$VERSION = "0.15";
+$VERSION = "0.16";
#use strict;
+package DynaLoader;
+
+EOT
+
+# dlutils.c before 5.006 has this:
+#
+# #ifdef DEBUGGING
+# dl_debug = SvIV( perl_get_sv("DynaLoader::dl_debug", 0x04) );
+# #endif
+#
+# where 0x04 is GV_ADDWARN, which causes a warning to be issued by the call
+# into XS below, if DynaLoader.pm hasn't been loaded.
+# It was changed to 0 in the commit(s) that added XSLoader to the core
+# (9cf41c4d23a47c8b and its parent 9426adcd48655815)
+# Hence to backport XSLoader to work silently with earlier DynaLoaders we need
+# to ensure that the variable exists:
+
+print OUT <<'EOT' if $] < 5.006;
+
# enable debug/trace messages from DynaLoader perl code
-# $dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug;
+$dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug;
-package DynaLoader;
+EOT
+print OUT <<'EOT';
# No prizes for guessing why we don't say 'bootstrap DynaLoader;' here.
# NOTE: All dl_*.xs (including dl_none.xs) define a dl_error() XSUB
boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&