Ticket #2936: Entity.pm-relative-templates.patch
File Entity.pm-relative-templates.patch, 755 bytes (added by , 9 years ago) |
---|
-
tools/entity/Entity.pm
83 83 } 84 84 } 85 85 $base->{' content'} = join ' ', @t; 86 } elsif ($new->{'@op'}) { 87 my $op = $new->{'@op'}{' content'}; 88 my $op1 = $base->{' content'}; 89 my $op2 = $new->{' content'}; 90 if ($op eq 'add') { 91 $base->{' content'} = $op1 + $op2; 92 } 93 elsif ($op eq 'mul') { 94 $base->{' content'} = $op1 * $op2; 95 } 96 else { 97 die "Invalid operator '$op'"; 98 } 86 99 } else { 87 100 $base->{' content'} = $new->{' content'}; 88 101 }