Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The myCommonLib.pm does live in the INC path list. The main program includes both classes without issue, looking something like:use myCommonLib;
I create objects of both classes and call their methods. When class2 attempts to call a function from myCommonLib, it gets an error saying that function doesn't exist. If I remove class1 from the program, then the method succeeds. Also if I reverse the include order, class2 then class1, I get errors on class1 function calls when it calls the common lib. Is there something I need to do to the myCommonLib.pm file to make it able to be included by two classes at once?use class1; use class2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use a package multiple times
by tj_thompson (Monk) on Dec 18, 2010 at 04:21 UTC | |
by Anonymous Monk on Dec 18, 2010 at 18:57 UTC | |
by Anonymous Monk on Dec 20, 2010 at 14:49 UTC | |
|
Re: use a package multiple times
by samarzone (Pilgrim) on Dec 18, 2010 at 06:51 UTC |