This is somewhat obscure. Previously, mod2fname would've tried
accessing $Config{dlext} each time it was called. The reason this
can be problematic is that mod2fname can be called during global destruction,
after %Config is freed but before its magic is. This was causing
Devel::GlobalDestruction's tests to fail on builds with -Dd_libname_unique.
This commit grabs the data we need when DynaLoader.pm is being built in
DynaLoader_pm.PL, so it no longer need to depend on %Config.
# Tim.Bunce@ig.co.uk, August 1994
BEGIN {
- $VERSION = '1.23';
+ $VERSION = '1.24';
}
use Config;
}
if ( $Config::Config{d_libname_unique} ) {
- print OUT <<'EOT';
+ printf OUT <<'EOT', length($Config::Config{dlext}) + 1;
sub mod2fname {
my $parts = shift;
- my $so_len = length($Config::Config{dlext})+1;
+ my $so_len = %d;
my $name_max = 255; # No easy way to get this here
my $libname = "PL_" . join("__", @$parts);