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

Report information
The Basics
Id:
13183
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
buddhahead [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
3.16
Fixed in:
(no value)

Attachments


Subject: inheritence problems
You get an error when you subclass HTML::Element. The necessary patch is included and is at http://unf.be/html-element-fix.patch. 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/Element.pm.old 2005-03-03 22:35:42.658567112 -0800 +++ /usr/share/perl5/HTML/Element.pm 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;
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 runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.