summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-11-26 12:33:34 +0000
committerNicholas Clark <nick@ccl4.org>2004-11-26 12:33:34 +0000
commit2ddb7828e223e2d2bbe82a4f9efaac6997a16d6c (patch)
tree0b5ea3109cc8f150ea90c0831ab9ca6d40ff690e /configpm
parent2f4f46aded53c2e2c32bd47e9a9d227762d35452 (diff)
downloadperl-2ddb7828e223e2d2bbe82a4f9efaac6997a16d6c.tar.gz
The change to the internal representation introduced a bug whereby
the key returned by FIRSTKEY had an erroneous leading newline. EXISTS was also buggy. p4raw-id: //depot/perl@23545
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm9
1 files changed, 3 insertions, 6 deletions
diff --git a/configpm b/configpm
index 87dba354ae..9b83df0e94 100755
--- a/configpm
+++ b/configpm
@@ -329,7 +329,7 @@ my $prevpos = 0;
sub FIRSTKEY {
$prevpos = 0;
- substr($Config_SH_expanded, 0, index($Config_SH_expanded, '=') );
+ substr($Config_SH_expanded, 1, index($Config_SH_expanded, '=') - 1 );
}
sub NEXTKEY {
@@ -342,14 +342,11 @@ sub NEXTKEY {
$len > 0 ? substr($Config_SH_expanded, $pos, $len) : undef;
}
-sub EXISTS {
+sub EXISTS {
return 1 if exists($_[0]->{$_[1]});
return(index($Config_SH_expanded, "\n$_[1]='") != -1 or
- substr($Config_SH_expanded, 0, length($_[1])+2) eq "$_[1]='" or
- index($Config_SH_expanded, "\n$_[1]=\"") != -1 or
- substr($Config_SH_expanded, 0, length($_[1])+2) eq "$_[1]=\"" or
- $_[1] =~ /^(?:(?:cc|ld)flags|libs(?:wanted)?)_nolargefiles$/
+ index($Config_SH_expanded, "\n$_[1]=\"") != -1
);
}