Skip Menu |

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

Report information
The Basics
Id: 26487
Status: new
Priority: 0/
Queue: HTML-TableExtract

People
Owner: Nobody in particular
Requestors: ovid [...] cpan.org
Cc:
AdminCc:

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



Subject: Use Delegation Instead of Inheritance
If you specify this: use HTML::TableExtract 'tree'; You inherit from HTML::TreeBuilder. If you use do this: use HTML::TableExtract; You inherit from HTML::Parser; This has caused us a bug which was hard to track down. Specifically, we had code which used 'tree' and ran perfectly when we ran it manually. However, our integration tests failed because a module loaded later did not use 'tree', thus causing our 'tree' instances to have the wrong inheritance tree. I'd recommend using delegation instead of inheritance so that methods could redispatch on a per-instance basis, rather than globally. Cheers, Ovid