Skip Menu |

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

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

Owner: Nobody in particular
Requestors: suhachov [...]

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

Subject: HTML::Element bug?
Date: Mon, 21 Aug 2006 10:59:53 +0400
To: petek [...]
From: "Andrew Suhachov" <suhachov [...]>
Download (untitled) / with headers
text/plain 954b
Hello. I've found that following code doesn't work: $tree->look_down( _tag=>'tr', sub { my $tr = shift; $tr->look_down( _tag=>'td', _parent=>$tr) ? 1 : 0; } ) (i.e. I want to find all TD that are direct children of TR.). This doesn't work, because of the following code in HTML::Element package: or ( $c->[2] eq 'Regexp' ? $val !~ $c->[1] : ( ref $val ne $c->[2] # have unequal ref values => fail or lc($val) ne $c->[1] # have unequal lc string values => fail )) Passed reference is compared with LOWERCASED sample. If I pass: _parent => lc $tr this doesn't work too, because "ref $val ne $c->[2]" fails. Of course, I can write: "sub {$_[0]->_parent eq $tr}" instead of "_parent=>$tr" but I think this is ugly and slow :( So I can suggest a patch: or lc($val) ne $c->[1] replace with or lc($val) ne lc($c->[1]) I did it in my local copy and this works fine. -- Best regards, Andrew.
Download (untitled) / with headers
text/plain 105b
Resolved as part of HTML-Tree 3.22, which will be released this weekend as part of the Chicago Hackathon.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to