Author: stevehay Date: Sun Aug 6 11:28:49 2023 New Revision: 1911489 URL: http://svn.apache.org/viewvc?rev=1911489&view=rev Log: Avoid various "uninitialized value" warnings from ExtUtils::MM_Unix and ExtUtils::MM_Any when running Makefile.PL
Modified: perl/modperl/trunk/lib/Apache2/Build.pm Modified: perl/modperl/trunk/lib/Apache2/Build.pm URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/Build.pm?rev=1911489&r1=1911488&r2=1911489&view=diff ============================================================================== --- perl/modperl/trunk/lib/Apache2/Build.pm (original) +++ perl/modperl/trunk/lib/Apache2/Build.pm Sun Aug 6 11:28:49 2023 @@ -1612,7 +1612,7 @@ sub mm_replace { } #help prevent warnings -my @mm_init_vars = (BASEEXT => ''); +my @mm_init_vars = (BASEEXT => '', NAME => ''); sub make_tools { my ($self, $fh) = @_; @@ -1627,6 +1627,10 @@ sub make_tools { # Fake initialize MakeMaker foreach my $m (qw(init_main init_others init_tools)) { $mm->$m() if $mm->can($m); + + # init_main() undefines the BASEEXT member which we initialized + # to a blank string to prevent warnings; reset it now + $mm->{BASEEXT} = '' if not defined $mm->{BASEEXT}; } for (qw(rm_f mv ld ar cp test_f)) {