in reply to Re^2: Conceptual Question About Classes and SubClasses
in thread Conceptual Question About Classes and SubClasses
Any subclasses for which X->validate does everything that is to do are finished now. Any subclass that has to do something more would have their own validate method. That method would then call the validate method of the superclass ($self->SUPER::validate) and if that returns ok, validate the additional stuff of the subclass.
As you can see, you probably need a validate method in A and in B, BUT you don't need to write any code twice.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Conceptual Question About Classes and SubClasses
by ~~David~~ (Hermit) on Aug 20, 2009 at 21:36 UTC |