summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-04-18 19:29:52 +0100
committerDavid Mitchell <davem@iabyn.com>2011-04-18 19:29:52 +0100
commitebf3760c26025a6c498c5d5dd2c9d1a8a46be64b (patch)
tree5931c8a9a9f8133dbedffbcf5c0c18b47abf3a9b
parent3b0f6d32e15e74a4df6d5451b750a04a869d1d26 (diff)
downloadperl-ebf3760c26025a6c498c5d5dd2c9d1a8a46be64b.tar.gz
configpm: handle multi-line key='value\n...'
There is old code in configpm to handle mulit-line entries in config.sh along the lines of plibpth='/lib/x86_64-redhat-linux/4.4.5/ /lib/../lib64/ /usr/lib/x86_64-redhat-linux/4.4.5/ /usr/lib/../lib64/ /lib/ /usr/lib/' which was broken, and produced Use of uninitialized value $1 warnings, and messed up the content of lib/Config_heavy.pl. We probably normally don't have multi-line entries, which is why no-one noticed it before, but 40f026236b9959b7ad3260fedc6c66cd30bb7abc has started generating the entry above.
-rwxr-xr-xconfigpm3
1 files changed, 2 insertions, 1 deletions
diff --git a/configpm b/configpm
index 7d6de3721e..77e0a56aa7 100755
--- a/configpm
+++ b/configpm
@@ -292,6 +292,7 @@ my @non_v = ();
my @v_others = ();
my $in_v = 0;
my %Data = ();
+my $quote;
my %seen_quotes;
@@ -323,11 +324,11 @@ my %seen_quotes;
push(@non_v, "#$_"); # not a name='value' line
next;
}
- my $quote = $2;
if ($in_v) {
$val .= $_;
}
else {
+ $quote = $2;
($name,$val) = ($1,$3);
}
$in_v = $val !~ /$quote\n/;