http://qs1969.pair.com?node_id=219677

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have just completed installing oracle8.i on win2000 and now I can't run any perl scripts. I receive the following error:
Can't locate warnings.pm in @INC <@INC contains: c:\Oracle\Apache\Perl +\5.00503\lib/MSWin32-x86 c:\Oracle\Apache\Perl\site\015.00503\lib at +foo.pl
I get the same error using any module...Please help

Replies are listed 'Best First'.
Re: can't load any modules
by batkins (Chaplain) on Dec 13, 2002 at 19:59 UTC
    it appears that oracle has gobbled up the paths to the perl library. this happened to me once, and i simply reinstalled perl and all was well.

    however, if you don't want to uninstall Perl (understandable), simply set your PERL5LIB environment variable to c:\perl\lib;c:\perl\site\lib.

    or, as a third alternative, you could explicitly specify these paths with use lib "C:\\perl\\site\\lib"; and use lib "C:\\perl\\lib"; of course, this isn't too portable.

Re: can't load any modules
by BronzeWing (Monk) on Dec 13, 2002 at 20:05 UTC

    Is your perl install directory actually "c:\Oracle\Apache\Perl\5.00503"? If you had previously installed perl somewhere like "c:\Perl" and then things recently stopped working, it looks like the @INC directory got messed up. I'm pretty sure that value is compiled in, so that would mean you weren't running the perl script with the perl.exe you thought you were.

    As a more broad response: It's important to realize that while "use strict", "use warnings", etc look like they're just parts of the language, they're actually modules that come packaged with perl. So the error means that nothing in @INC contains the default perl modules, which reinforces my guess that a second perl binary got installed somehow and took precedence over your original.

    Tell me if any of this sounds familliar.

    -BronzeWing


    Perl Monks do it more than one way.