Change 11458 by jhi@alpha on 2001/07/23 22:41:19
Subject: [PATCH] Print CONFIGURE params in ExtUtils::MakeMaker output
From: "David D. Kilzer" <[EMAIL PROTECTED]>
Date: Mon, 23 Jul 2001 11:32:17 -0500
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/lib/ExtUtils/MakeMaker.pm#63 edit
Differences ...
==== //depot/perl/lib/ExtUtils/MakeMaker.pm#63 (text) ====
Index: perl/lib/ExtUtils/MakeMaker.pm
--- perl/lib/ExtUtils/MakeMaker.pm.~1~ Mon Jul 23 16:45:05 2001
+++ perl/lib/ExtUtils/MakeMaker.pm Mon Jul 23 16:45:05 2001
@@ -335,6 +335,7 @@
check_hints($self);
+ my %configure_att; # record &{$self->{CONFIGURE}} attributes
my(%initial_att) = %$self; # record initial attributes
my($prereq);
@@ -374,7 +375,8 @@
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 @@
$v =~ tr/\n/ /s;
push @{$self->{RESULT}}, "# $key => $v";
}
+ undef %initial_att; # free memory
+
+ if (defined $self->{CONFIGURE}) {
+ push @{$self->{RESULT}}, <<END;
+
+# MakeMaker 'CONFIGURE' Parameters:
+END
+ if (scalar(keys %configure_att) > 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);
End of Patch.