diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-09-10 17:10:55 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-09-11 19:30:21 +0200 |
commit | daef35dbd8d4bdf1d5f639f82eb72fa9039ada84 (patch) | |
tree | 9a39b80103991cf4cb2944e78d9d5f7be1a0fe67 | |
parent | e9ce7e77f0788e00a80d0c8eaa1bbe852e1e3d62 (diff) | |
download | perl-daef35dbd8d4bdf1d5f639f82eb72fa9039ada84.tar.gz |
Eliminate warnings from XSLoader on 5.005 and 5.004.
Don't pass parameters that old ExtUtil::MakeMaker doesn't understand.
Ensure that $DynaLoader::dl_debug exists prior to calling into DynaLoader's
XS code.
-rw-r--r-- | dist/XSLoader/Makefile.PL | 8 | ||||
-rw-r--r-- | dist/XSLoader/XSLoader_pm.PL | 26 | ||||
-rw-r--r-- | pod/perldelta.pod | 4 |
3 files changed, 32 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) && diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 301d63d49e..97f1a22ebd 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -241,6 +241,10 @@ implementation detail was buggy, and may fail as a result of this change. The module's Perl code has been considerably simplified, roughly halving the number of lines, with no change in functionality. +=item * + +L<XSLoader> has been upgraded from version 0.15 to version 0.16. + =back =head2 Removed Modules and Pragmata |