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.
use Config;
use strict;
-our $VERSION = "1.23";
+our $VERSION = "1.24";
my %err = ();
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';