Skip Menu |

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

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

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

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


Subject: inheritence problems
Download (untitled) / with headers
text/plain 271b
You get an error when you subclass HTML::Element. The necessary patch is included and is at I applied this tiny fix and it seems to be fixing the problem. If you don't, you get an error like "can't use string 1 as reference" Thanks!
--- /usr/share/perl5/HTML/ 2005-03-03 22:35:42.658567112 -0800 +++ /usr/share/perl5/HTML/ 2005-03-03 22:32:48.003118776 -0800 @@ -3433,7 +3433,7 @@ #print "Children: @children\n"; - if($class eq __PACKAGE__) { # Special-case it, for speed: + if(UNIVERSAL::isa($class, __PACKAGE__)) { # Special-case it, for speed: #print "Special cased / [@attributes]\n"; %$node = (%$node, @attributes) if @attributes;
Download (untitled) / with headers
text/plain 272b
Can't reproduce with 3.18 and up. Please resubmit with a test case if you are still having this issue. As an aside, class comes from ref($proto)||$proto, which means it's a scalar value. This means that the attached patch always sends the value through the "else" loop.

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

Please report any issues with to