sub _parse { DOM::Tiny::HTML->new(xml => shift->xml)->parse(shift)->tree }
sub _replace {
- my ($self, $parent, $tree, @nodes) = @_;
- splice @$parent, _offset($parent, $tree), 1, _link($parent, @nodes);
+ my ($self, $parent, $child, @nodes) = @_;
+ splice @$parent, _offset($parent, $child), 1, _link($parent, @nodes);
return $self->parent;
}