Just to nit-pick your nit-picking :), is that a limitation of @ISA or a limitation of Perl? If you wanted base classes to "inherit" class attributes, don't you pretty much need to have the base class export the data or inherit methods that will provide said data?
I'd appreciate more discussion on this because Perl was my first exposure to writing OO code and now that I've been studying Java, I'm really beginning to see some of the limitations that Perl has in this area. In particular, I'd really appreciate being able to provide true method overloading, but I suspect Perl's variadic functions (and, perhaps, not being able to use prototypes with methods) are the reason this wasn't implemented, short of a generic method that uses an internal dispatch table based upon the contents of @_. Hmm... maybe I should add this to my XMas wish list :)
Now there's an interesting thought for a meditation... how do Monks simulate missing OO features in Perl?
Method overloading
Class::Multimethods
Data inheritence
Class::Class? (unless I misread the docs)
Separate class and instance methods
Bless the object into a separate package?
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid) Re(3): A question of Inheritance
by Ovid
in thread A question of Inheritance
by tradez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |