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



On Sep 17, 4:17 pm, Phani Ranjan <PhaniRan...@xxxxxxxxx> wrote:
On Sep 17, 10:12 am, Sherm Pendley <spamt...@xxxxxxxxxxx> wrote:





Phani Ranjan <PhaniRan...@xxxxxxxxx> writes:
On Sep 16, 11:39 pm, Sherm Pendley <spamt...@xxxxxxxxxxx> wrote:
PhaniRan...@xxxxxxxxx writes:
i have many modules which inturn use among themselvs.. some times i
get the following error..
Can't locate <>.pm in @INC though it is present in that location..

Perl isn't just guessing. It looked, and the fact that you get this
error indicates that the requested module is *not* in fact present at
that location.

Look more closely at your use statement, and the list of directories
printed in the error message. One of them is not what you think it
is.

Thanks for the info.. but i can see the files peresent in the
specified libs folder..

Denying that an error *can* happen, when it clearly *is* happening, is
not productive.

As I said - examine your use statement closely. Examine the directory
listing closely. Post the exact error message here - copy and paste
the whole thing, including the list of directories in @INC. Tell us
what file you think Perl should be finding, and what directory it's
in.

sherm--

--
My blog:http://shermspace.blogspot.com
Cocoa programming in Perl:http://camelbones.sourceforge.net-Hide quoted text -

- Show quoted text -

hi Sherm..
sorry.. for not providing enough details..

below is the error thrown..

Useless use of a variable in void context at ../../Utils/Resource.pm
line 43.
Useless use of a variable in void context at ../../Utils/Resource.pm
line 44.

What does lines 43 and 44 of Resource.pm contain ? (This may have no
bearing on the problem.)

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 .)

Which of the @INC directories mentioned above contains
TMAsiaUtils.pm ?
Could you 'cd' to that directory, run 'dir' and provide a copy'n'paste
of the output. (We don't need to see the *entire* output if it's big -
all we need to see is that TMAsiaUtils.pm does, in fact, exist in that
directory.)


if (-e "../../SupportFunctions") {use lib "../../SupportFunctions";}
else {use lib "./SupportFunctions";}
if (-e "../../Utils") {use lib "../../Utils";} else {use lib "./
Utils";}

Note that none of those directories is actually in @INC when the
attempt to load TMAsiaUtils.pm is made. Could that be the problem ?

Cheers,
Rob
.



Relevant Pages