Re: How to avoid multiple Inclusions of perl modules.. or how to detect mutliple inclusions.



On Sep 18, 4:37 pm, Phani Ranjan <PhaniRan...@xxxxxxxxx> wrote:
On Sep 18, 11:09 am, sisyphus <sisyphus...@xxxxxxxxx> wrote:
..
..
Yep - it seems to be there. Which directory is that ?
..

As i mentioned earlier.. it is in Utils folder..

./Utils/<*.pm>
./SupportFunctions/<*.pm>
./TestScripts/PXDMScripts/<*.pl>

Then that's the problem - the Utils folder is not in @INC:

----------------------------------
Can't locate TMAsiaUtils.pm in @INC (@INC contains: C:\Program Files
\ActiveState Komodo IDE 4\lib\support\dbgp\perllib c:\staf\bin c:
\PROGRA~1\Qualcomm\Asia\PerlEnv C:/Perl/lib C:/Perl/site/lib .)
----------------------------------

I don't see any mention of any Utils folder.

I know you've made some attempt to add the Utils folder to @INC (use
lib), but it hasn't worked. When TMAsiaUtils.pm gets called up for
loading, the Utils directory is not in @INC. You need to fix that. Try
*starting* your scripts with:

use lib ('./Utils', '../../Utils');

That should add both ./Utils and ../../Utils to @INC. I gather, from
the code provided earlier that TMAsiaUtils.pm will be in one of those
locations. It won't matter that @INC contains a non-existent
directory.

Cheers,
Rob

.