From: David D. Kilzer Date: Mon, 23 Jul 2001 11:32:17 +0000 (-0500) Subject: Print CONFIGURE params in ExtUtils::MakeMaker output X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c3be8c6e992cd429c91bc2f69757e27ca402e340;p=p5sagit%2Fp5-mst-13.2.git Print CONFIGURE params in ExtUtils::MakeMaker output Message-ID: <20010723113217.A28614@elbonia.lubricants-oil.com> p4raw-id: //depot/perl@11458 --- diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index cef46bc..d81cd27 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -335,6 +335,7 @@ sub ExtUtils::MakeMaker::new { check_hints($self); + my %configure_att; # record &{$self->{CONFIGURE}} attributes my(%initial_att) = %$self; # record initial attributes my($prereq); @@ -374,7 +375,8 @@ sub ExtUtils::MakeMaker::new { if (defined $self->{CONFIGURE}) { if (ref $self->{CONFIGURE} eq 'CODE') { - $self = { %$self, %{&{$self->{CONFIGURE}}}}; + %configure_att = %{&{$self->{CONFIGURE}}}; + $self = { %$self, %configure_att }; } else { Carp::croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n"; } @@ -480,6 +482,27 @@ END $v =~ tr/\n/ /s; push @{$self->{RESULT}}, "# $key => $v"; } + undef %initial_att; # free memory + + if (defined $self->{CONFIGURE}) { + push @{$self->{RESULT}}, < 0) { + foreach $key (sort keys %configure_att){ + my($v) = neatvalue($configure_att{$key}); + $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/; + $v =~ tr/\n/ /s; + push @{$self->{RESULT}}, "# $key => $v"; + } + } + else + { + push @{$self->{RESULT}}, "# no values returned"; + } + undef %configure_att; # free memory + } # turn the SKIP array into a SKIPHASH hash my (%skip,$skip);