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.
In reply to Re^3: Point me in the right direction with OO inheritance and static variables
by tobyink
in thread Point me in the right direction with OO inheritance and static variables
by Amblikai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |