in reply to Re^2: Point me in the right direction with OO inheritance and static variables
in thread Point me in the right direction with OO inheritance and static variables
The child class has a package variable called @ISA which tells it the parent class. This is an array because multiple inheritance is supported.
package Child { require Parent; our @ISA = "Parent"; }
For some reason, setting @ISA directly like that is not very fashionable, and a lot of people prefer to use a module like base, parent, or superclass to do so. Using one of those modules ensures that @ISA gets set at compile-time rather than run-time, though in practice this feature of them is almost never important.
|
|---|