The problem that I started with is one that I've never had in C++ (or python as far as I recall). That doesn't mean that perl is "bad" or anything. Just different. I see that there is a different approach to OO in perl than C++. Nothing wrong with different, per se.
I like all the interesting ideas presented in these solutions. But I didn't use any of them. Most of them require the parent to have some knowledge of the children that may inherit from it. Which is a big OO no-no in my opinion.
What I ended up doing was replicating some of the parent method's functionality in the child method. This is something that I shouldn't have to do. That's part of the point of inheritance to re-use that code. But I find that with perl, its easier to do that than to go through shenannigans to access parent methods of a parent object that is never actually instantiated...
Thanks for your many replies. it has been a learning experience, and I will continue to follow the thread and I will return to perl-monks now that I have found such a great community!
In reply to Re^3: my $self is stumped!
by headybrew
in thread my $self is stumped!
by headybrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |