diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/h2xs.PL | 5 | ||||
-rw-r--r-- | utils/perlbug.PL | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 992af477d9..5bd9b474de 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -122,7 +122,7 @@ Specifies a name to be used for the extension, e.g., S<-n RPC::DCE> Specify a prefix which should be removed from the Perl function names, e.g., S<-p sec_rgy_> This sets up the XS B<PREFIX> keyword and removes the prefix from functions that are -autoloaded via the C<constant()> mechansim. +autoloaded via the C<constant()> mechanism. =item B<-s> I<sub1,sub2> @@ -425,6 +425,7 @@ else{ # will want Carp. print PM <<'END'; use Carp; +use Errno; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); END } @@ -477,7 +478,7 @@ sub AUTOLOAD { croak "&$module::constant not defined" if \$constname eq 'constant'; my \$val = constant(\$constname, \@_ ? \$_[0] : 0); if (\$! != 0) { - if (\$! =~ /Invalid/) { + if (\$!{EINVAL} || \$! =~ /Invalid/) { \$AutoLoader::AUTOLOAD = \$AUTOLOAD; goto &AutoLoader::AUTOLOAD; } diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 377893a959..dc5a6ada28 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -527,10 +527,13 @@ EOF --- Environment for perl $]: EOF - for my $env (sort - (qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR LANGUAGE), - grep /^(?:PERL|LC_)/, keys %ENV) - ) { + my @env = + qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR LANGUAGE); + push @env, $Config{ldlibpthname} if $Config{ldlibpthname} ne ''; + push @env, grep /^(?:PERL|LC_|LANG)/, keys %ENV; + my %env; + @env{@env} = @env; + for my $env (sort keys %env) { print OUT " $env", exists $ENV{$env} ? "=$ENV{$env}" : ' (unset)', "\n"; |