Permalink
Browse files

small optimization

  • Loading branch information...
1 parent 47a5c90 commit 095f2c67c88207fea3c389cba4f51acb7fbaa611 @tomill committed Feb 14, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Template/Semantic/Document.pm
@@ -164,11 +164,12 @@ sub _assign_value {
}
my $container = XML::LibXML::DocumentFragment->new;
+ my $tmpl_xml = $node->serialize;
my $joint;
for my $v (@$value) {
next if ref($v) ne 'HASH';
- my $tmpl = $self->_to_node($node->serialize);
+ my $tmpl = $self->_to_node($tmpl_xml);
$self->_query($tmpl, $v);
$container->addChild($joint->cloneNode) if $joint;
$container->addChild($tmpl);

0 comments on commit 095f2c6

Please sign in to comment.