Heidegger has asked for the wisdom of the Perl Monks concerning the following question:
Hello Perl Monks,
I have two modules that reference each other. I get the following error when I want to use them: Can't locate object method "new" via package "DocumentManager" (perhaps you forgot to load "DocumentManager"?
Here's how my packages look like:
package DocumentManager; ... use Mokslas::EmployeesView; ...
package EmployeesView; ... use Mokslas::DocumentManager; ...
Well, maybe it's not a good design practice, but I wonder how could I make it work in Perl. Java wouldn't moan about it. In C++ I would workaround with forward declarations. How people resolve cyclic module dependency in Perl? Thank you very much.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cyclic module references
by bronto (Priest) on Feb 07, 2003 at 17:27 UTC | |
|
Re: Cyclic module references
by PodMaster (Abbot) on Feb 07, 2003 at 17:31 UTC | |
|
Re: Cyclic module references
by blokhead (Monsignor) on Feb 07, 2003 at 18:46 UTC | |
|
Re: Cyclic module references
by BrowserUk (Patriarch) on Feb 07, 2003 at 17:10 UTC | |
|
Re: Cyclic module references
by BronzeWing (Monk) on Feb 07, 2003 at 17:58 UTC |