In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/a9b708ba5552bfe8ce5d5a0291df60aca3b2e883?hp=d2a9272722b0e544c349fbad8e2f2feba3cce4dd>
- Log ----------------------------------------------------------------- commit a9b708ba5552bfe8ce5d5a0291df60aca3b2e883 Author: Todd Rinaldo <[email protected]> Date: Wed Aug 26 16:49:58 2015 -0500 Avoid %Config check on Errno load if it was built with PERL_BUILD_EXPAND_CONFIG_VARS Any person who built perl with this environment variable already has locked their install to the given platform. Therefore this check should be unnecessary on those installs. This reduces runtime bloat because Config does not have to be loaded any time someone uses $! or Errno directly. ----------------------------------------------------------------------- Summary of changes: ext/Errno/Errno_pm.PL | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index c6bfa06..1d9c048 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker; use Config; use strict; -our $VERSION = "1.23"; +our $VERSION = "1.24"; my %err = (); @@ -278,13 +278,24 @@ sub write_errno_pm { package Errno; require Exporter; -use Config; use strict; +EDQ + + # Errno only needs Config to make sure it hasn't changed platforms. + # If someone set $ENV{PERL_BUILD_EXPAND_CONFIG_VARS} at build time, + # they've already declared perl doesn't need to worry about this risk. + if(!$ENV{'PERL_BUILD_EXPAND_CONFIG_VARS'}) { + print <<"CONFIG_CHECK_END"; +use Config; "\$Config{'archname'}-\$Config{'osvers'}" eq "$archname-$Config{'osvers'}" or die "Errno architecture ($archname-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})"; +CONFIG_CHECK_END +} + + print <<"EDQ"; our \$VERSION = "$VERSION"; \$VERSION = eval \$VERSION; our \@ISA = 'Exporter'; -- Perl5 Master Repository
