Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The 4 sibling modules use base qw(Materia::Variable), which I believe is the correct thing.
At the beginning of a program which uses these 4 modules, I have the 4 use Materia::Variable::... statements. A little ways into the program, the first object I make happens to be ...Generic. It works fine. The next line tries to create a ...Pressure object. And I get:
Can't locate object method "new" via package "Materia::Variable::Pressure" ...
The new methods in all of these classes do very little. Most of the work is done in an _init() method in the base class. @INC includes the directory where all this stuff lives. How come it is forgetting that the module exists? How do you debug this? Single stepping in emacs/perldb is getting me nowhere.
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OO: short memory?
by plobsing (Friar) on Jan 27, 2008 at 23:16 UTC | |
by Anonymous Monk on Jan 27, 2008 at 23:45 UTC | |
by hipowls (Curate) on Jan 27, 2008 at 23:58 UTC | |
by Anonymous Monk on Jan 28, 2008 at 01:10 UTC | |
by plobsing (Friar) on Jan 28, 2008 at 02:00 UTC | |
| |
by plobsing (Friar) on Jan 27, 2008 at 23:53 UTC | |
|
Re: OO: short memory?
by starX (Chaplain) on Jan 27, 2008 at 23:53 UTC | |
|
Re: OO: short memory?
by cdarke (Prior) on Jan 28, 2008 at 09:33 UTC |