Trace: empty or zero value is equivalent to no ID
This commit is contained in:
parent
d8389b2b77
commit
0fc6ae8a75
22
ACU/Trace.pm
22
ACU/Trace.pm
@ -179,28 +179,38 @@ sub end_element
|
||||
{
|
||||
my ($self, $element) = @_;
|
||||
|
||||
if ($element->{Name} eq "value") {
|
||||
if ($self->{values} =~ /(-?[0-9]+(.[0-9]+)?)/) {
|
||||
if ($element->{Name} eq "value")
|
||||
{
|
||||
if ($self->{values} =~ /(-?[0-9]+(.[0-9]+)?)/)
|
||||
{
|
||||
$self->{parsed}{ids}{ $self->{inEval} } += $1;
|
||||
if ($self->{inValue} ne NO_ID_VALUE) {
|
||||
if ($self->{inValue} ne NO_ID_VALUE and $1) {
|
||||
$self->{parsed}{ids}{ $self->{inValue} } = $1;
|
||||
}
|
||||
}
|
||||
$self->{inValue} = "";
|
||||
}
|
||||
elsif ($element->{Name} eq "comment") {
|
||||
elsif ($element->{Name} eq "eval")
|
||||
{
|
||||
delete $self->{parsed}{ids}{ $self->{inEval} } if (!$self->{parsed}{ids}{ $self->{inEval} });
|
||||
$self->{inEval} = "";
|
||||
}
|
||||
elsif ($element->{Name} eq "comment")
|
||||
{
|
||||
if ($self->{values} =~ /([^\s].*[^\s]|[^\s])/) {
|
||||
$self->{parsed}{comments}{ $self->{inComment} } = $1;
|
||||
}
|
||||
$self->{inComment} = "";
|
||||
}
|
||||
elsif ($element->{Name} eq "who") {
|
||||
elsif ($element->{Name} eq "who")
|
||||
{
|
||||
if ($self->{values} =~ /([^\s].*[^\s]|[^\s])/) {
|
||||
$self->{parsed}{who}{ $self->{inWho} } = $1;
|
||||
}
|
||||
$self->{inComment} = "";
|
||||
}
|
||||
elsif ($element->{Name} eq "info") {
|
||||
elsif ($element->{Name} eq "info")
|
||||
{
|
||||
if ($self->{values} =~ /([^\s].*[^\s]|[^\s])/) {
|
||||
$self->{parsed}{infos}{ $self->{inInfo} } = $1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user