Skip Menu |

This queue is for tickets about the HTML-Tree CPAN distribution.

Report information
The Basics
Id: 45495
Status: resolved
Priority: 0/
Queue: HTML-Tree

People
Owner: Jeff.Fearn [...] gmail.com
Requestors: ishiyosi [...] rose.odn.ne.jp
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: HTML::Element::replace_with does not set $_->{'_parent'}
Date: Tue, 28 Apr 2009 05:44:40 +0900 (JST)
To: bug-html-tree [...] rt.cpan.org
From: Y.Ishiyama <ishiyosi [...] rose.odn.ne.jp>
I am glad. Because the chance when it was able to contribute was obtained. Of course, I am using the HTML-Tree-3.23. #!/usr/bin/perl use HTML::TreeBuilder; $root = HTML::TreeBuilder->new_from_content('<p><br/></p>'); $para = $root->find_by_tag_name('p'); print '$para=', $para, "\n"; $br = $para->find_by_tag_name('br'); print '$br->parent=', $br->parent, "\n"; # equal to $para $br->replace_with(['br'])->delete; $br = $para->find_by_tag_name('br'); # $para has $br. but print '$br->parent=', $br->parent, "\n"; # $br has not parent $br->delete; # deleted. but print $root->as_HTML( undef,undef,{}); # not removed
This was patched by patch from 45495.
I think you mean it was solved by my patch from bug 28204. This *is* bug 45495.
On Sat Apr 24 18:01:32 2010, CJM wrote: Show quoted text
> I think you mean it was solved by my patch from bug 28204. This *is* > bug 45495.
Guilty as charged.
Subject: 4.0 released
Hi HTML::Tree ve4rsion 4.0 has been released which includes a fix for this issue. Cheers, Jeff.