This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove MacOS (classic) code from makedef.pl.
[perl5.git] / configpm
index 4deb4d9..cad3a9a 100755 (executable)
--- a/configpm
+++ b/configpm
@@ -52,6 +52,11 @@ while ($how_many_common--) {
     $Common{$1} = $1;
 }
 
+# Post 37589e1eefb1bd62 DynaLoader defaults to reading these at runtime.
+# Ideally we're redo the data below, but Fotango's build system made it
+# wonderfully easy to instrument, and no longer exists.
+$Common{$_} = $_ foreach qw(dlext so);
+
 # names of things which may need to have slashes changed to double-colons
 my %Extensions = map {($_,$_)}
                  qw(dynamic_ext static_ext extensions known_extensions);
@@ -188,13 +193,16 @@ sub config_sh;
 sub config_vars;
 sub config_re;
 
-my %%Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
+# Skip @Config::EXPORT because it only contains %%Config, which we special
+# case below as it's not a function. @Config::EXPORT won't change in the
+# lifetime of Perl 5.
+my %%Export_Cache = map {($_ => 1)} @Config::EXPORT_OK;
 
 our %%Config;
 
 # Define our own import method to avoid pulling in the full Exporter:
 sub import {
-    my $pkg = shift;
+    shift;
     @_ = @Config::EXPORT unless @_;
 
     my @funcs = grep $_ ne '%%Config', @_;
@@ -203,8 +211,8 @@ sub import {
     no strict 'refs';
     my $callpkg = caller(0);
     foreach my $func (@funcs) {
-       die sprintf qq{"%%s" is not exported by the %%s module\n},
-           $func, __PACKAGE__ unless $Export_Cache{$func};
+       die qq{"$func" is not exported by the Config module\n}
+           unless $Export_Cache{$func};
        *{$callpkg.'::'.$func} = \&{$func};
     }
 
@@ -212,11 +220,11 @@ sub import {
     return;
 }
 
-die "Perl lib version (%s) doesn't match executable version ($])"
+die "Perl lib version (%s) doesn't match executable '$0' version ($])"
     unless $^V;
 
 $^V eq %s
-    or die "Perl lib version (%s) doesn't match executable version (" .
+    or die "Perl lib version (%s) doesn't match executable '$0' version (" .
        sprintf("v%%vd",$^V) . ")";
 
 ENDOFBEG