diff options
author | Gerard Goossen <gerard@tty.nl> | 2007-03-25 15:36:31 +0200 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2007-05-12 22:43:01 +0000 |
commit | fb2b694ac153e3b2b3f9e40df708ecd1973cbf38 (patch) | |
tree | b12264036e5ee5abbd5f96d6584fc13c7071215f /mad | |
parent | e9cc17ba00cc39cdcabc27d876cb322b6bbd3a59 (diff) | |
download | perl-fb2b694ac153e3b2b3f9e40df708ecd1973cbf38.tar.gz |
move the logic of combining '_' and '#' with the previous logic
from Nomad.pm to dump.c. So they are already combined in the XML
dump.
Subject: [PATCH] mad: combine whitespace keys '_' '#' in dump.c instead of Nomad.pm
Message-Id: <20070508170341.GH17043@ostwald>
p4raw-id: //depot/perl@31207
Diffstat (limited to 'mad')
-rwxr-xr-x | mad/Nomad.pm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mad/Nomad.pm b/mad/Nomad.pm index 49659a8f04..e425467038 100755 --- a/mad/Nomad.pm +++ b/mad/Nomad.pm @@ -519,13 +519,8 @@ sub hash { for my $kid (@{$$self{Kids}}) { my ($k,$v) = $kid->pair($self, @_); $firstthing ||= $k; - if ($k =~ /^[_#]$/) { # rekey whitespace according to preceding entry - $k .= $lastthing; # (which is actually the token the whitespace is before) - } - else { - $k .= 'x' while exists $hash{$k}; - $lastthing = $k; - } + $k .= 'x' while exists $hash{$k}; + $lastthing = $k; $hash{$k} = $v; } $hash{FIRST} = $firstthing; |