Greetings, fellow Monks!
I've been through the Object Oriented stuff here, but can't seem to locate anything that relates to my current situation. I am trying to create some process logging classes for a web application at work. The basic structure is this:
BaseClass.pm | +-> Log.pm | +-> Writer.pm +-> Reader.pm
The Log.pm class (BaseClass::Log) inherits some general configuration stuff, a Database handle and other little things needed for the application. The Log.pm contains the functions that would be shared between the Reader (BaseClass::Log::Reader) and Writer (BaseClass::Log::Writer); namely primary key lookup functions and the like. The Writer.pm and Reader.pm contain only the methods necessary to write and read from the log tables.
The Log.pm has an @ISA=qw(BaseClass); Reader.pm and Writer.pm both have @ISA=qw(BaseClass::Log). The object is being blessed (2 argument) in the BaseClass.pm file, and all subsequent modules make a call to $class->SUPER::new.
Everything seems to work fine for the first creation (Writer to Log), but upon calling $class->SUPER::new from the Log object, the class still reads "BaseClass::Log::Writer".
What am I doing wrong?
In reply to Objects and Inheritance by Bobcat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |