in reply to Inheritance not working...
Try assigning to @ISA in a BEGIN block.
BEGIN { @objFood::ISA = qw(Object); }
The reason why you don't have to do that when the classes are in their own module, is the fact that the bare code in a module is run as soon as the file is compiled, through use.
|
|---|