mirror of https://github.com/openssl/openssl
Make the table entry printer in Configure aware of ARRAYs
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
d3c02d844a
commit
cb212f239a
14
Configure
14
Configure
|
@ -2238,14 +2238,24 @@ sub print_table_entry
|
||||||
if ($type eq "TABLE") {
|
if ($type eq "TABLE") {
|
||||||
print "\n";
|
print "\n";
|
||||||
print "*** $target\n";
|
print "*** $target\n";
|
||||||
printf "\$%-12s = %s\n", $_, $target{$_} foreach (@sequence);
|
foreach (@sequence) {
|
||||||
|
if (ref($target{$_}) eq "ARRAY") {
|
||||||
|
printf "\$%-12s = %s\n", $_, join(" ", @{$target{$_}});
|
||||||
|
} else {
|
||||||
|
printf "\$%-12s = %s\n", $_, $target{$_};
|
||||||
|
}
|
||||||
|
}
|
||||||
} elsif ($type eq "HASH") {
|
} elsif ($type eq "HASH") {
|
||||||
my $largest =
|
my $largest =
|
||||||
length((sort { length($a) <=> length($b) } @sequence)[-1]);
|
length((sort { length($a) <=> length($b) } @sequence)[-1]);
|
||||||
print " '$target' => {\n";
|
print " '$target' => {\n";
|
||||||
foreach (@sequence) {
|
foreach (@sequence) {
|
||||||
if ($target{$_}) {
|
if ($target{$_}) {
|
||||||
print " '",$_,"'"," " x ($largest - length($_))," => '",$target{$_},"',\n";
|
if (ref($target{$_}) eq "ARRAY") {
|
||||||
|
print " '",$_,"'"," " x ($largest - length($_))," => [ ",join(", ", map { "'$_'" } @{$target{$_}})," ],\n";
|
||||||
|
} else {
|
||||||
|
print " '",$_,"'"," " x ($largest - length($_))," => '",$target{$_},"',\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print " },\n";
|
print " },\n";
|
||||||
|
|
Loading…
Reference in New Issue