Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm a bit of a perl OOP newbie, so please excuse me for my lack of experience/know-how.. I'm interested in inheriting from a class where many of the methods return a new copy of itself instead of operating on its own instance. If I derive from this class and I call one of these methods, I'm interested in getting back the derived class (not the base). Is there a way to accomplish this without overriding all the base class methods? (especially since I might want to create many of these types of objects that derive from this base class).
Any help/guidance/examples would be very much appreciated!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl inheritance
by jandrew (Chaplain) on Mar 24, 2012 at 04:38 UTC | |
|
Re: perl inheritance
by JavaFan (Canon) on Mar 23, 2012 at 18:26 UTC | |
by Anonymous Monk on Mar 23, 2012 at 18:38 UTC | |
by JavaFan (Canon) on Mar 23, 2012 at 19:10 UTC | |
by Anonymous Monk on Mar 23, 2012 at 20:21 UTC | |
by tobyink (Canon) on Mar 23, 2012 at 23:06 UTC | |
| |
by JavaFan (Canon) on Mar 23, 2012 at 20:27 UTC | |
by Anonymous Monk on Mar 23, 2012 at 20:35 UTC | |
|
Re: perl inheritance
by chromatic (Archbishop) on Mar 23, 2012 at 20:38 UTC | |
by Anonymous Monk on Mar 23, 2012 at 21:01 UTC | |
by chromatic (Archbishop) on Mar 23, 2012 at 22:02 UTC | |
by Anonymous Monk on Mar 26, 2012 at 14:07 UTC | |
by chromatic (Archbishop) on Mar 27, 2012 at 16:19 UTC | |
|