Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
tomill committed Feb 14, 2010
1 parent 47a5c90 commit 095f2c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Template/Semantic/Document.pm
Expand Up @@ -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);
Expand Down

0 comments on commit 095f2c6

Please sign in to comment.