J
James Hughes
Hi,
Let's say I have a third party module, Foo, with class Foo::Bar. I
have two classes, A and B, which inherit from Foo::Bar. And, I have a
set of class methods which need to be available to objects of class A
and B, and have access to all the class variables and methods from
Foo::Bar.
What is the best way to incorporate the needed methods into this
hierarchy? Right now I've just hacked them into the source for the
third party lib that I'm working with, after trying various options
such as reopening Foo::Bar in A (this obviously broke when I needed to
add class B), inserting another class into the hierarchy between Bar
and A and B, and probably some other ideas I've forgotten.
I know there is probably a simple solution to this but my OOP muscles
don't seem to be flexing optimally. Can anyone give me a nudge in the
right direction?
thanks
jh
Let's say I have a third party module, Foo, with class Foo::Bar. I
have two classes, A and B, which inherit from Foo::Bar. And, I have a
set of class methods which need to be available to objects of class A
and B, and have access to all the class variables and methods from
Foo::Bar.
What is the best way to incorporate the needed methods into this
hierarchy? Right now I've just hacked them into the source for the
third party lib that I'm working with, after trying various options
such as reopening Foo::Bar in A (this obviously broke when I needed to
add class B), inserting another class into the hierarchy between Bar
and A and B, and probably some other ideas I've forgotten.
I know there is probably a simple solution to this but my OOP muscles
don't seem to be flexing optimally. Can anyone give me a nudge in the
right direction?
thanks
jh