[ABE.pm] Inhertance
Faber Fedor
faber at linuxnj.com
Wed Mar 7 09:42:17 PST 2007
Can I overload functions in perl? Any pointers on how to do
inheritance in Perl?
I've got an class ClassOne with a function called myAverage(). I now
need a second function that's slightly different called
myOtherAverage().
Right now, I've simply added myOtherAverage() to ClassOne but since I
have to create several myOther* functions, I don't like this approach.
Am I correct in wanting to do this: create an object called OtherOne
that inherits from ClassOne and has a function called myAverage which
is actually myOtherAverage?
--
Faber
More information about the ABE-pm
mailing list