in reply to Life in the land of OOP, and I'm confused.
This is typical, in my observation. Unless a class is designed very very very carefully, it's generally not cleanly subclassable for all needs.
For this particular case, you'll probably have to override any method that refers by name to HTML::TableExtract::TableState to create a new class of your choosing. And yes, that'll require cutting and pasting code for the parts that didn't change. Sucks, doesn't it?
What's missing is a method like:
Then you could override just the thing that makes the child object to make one of your object. Write the author and maybe they'll put that in.sub createTableState { my $self = shift; return HTML::TableExtract::TableState->new(@_); } sub initialize_some_stuff { my $self = shift; blah blah; $self->{state} = $self->createTableState; blah blah; }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jcwren) RE: Re: Life in the land of OOP
by jcwren (Prior) on Aug 03, 2000 at 07:24 UTC |