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

Hi,

I've got a problem. I have Perl on Windows Server 2003. I have Oracle also on the box. The problem I have is that Oracle seems to have its own version of Perl and that the two are getting confused.

I don't want Oracle to use my install of Perl and I don't want my install of Perl using Oracle's. However my install of Perl seems to pick up the same @INC as Oracle's. When I go to use any module I'm told that the Perl lib versions don't match.

Perl and Oracle both set some system wide environmental vars, which I have had to modify from the Windows Control Panel. The first was path which I had to remove C:\Perl\bin from it otherwise Oracle would use the wrong perl. The other was PERL5LIB which I had to remove or Perl would use Oracle's perl libs.

The problem comes when I log off and back onto the box. Although PERL5LIB is no longer shown as an env var in the Control Panel, Perl (only after I log back into the box) behaves as if PERL5LIB was set to point the Oracle Perl libs.

If I set PERL5LIB to C:\Perl\site\lib, then Oracle gets really unhappy. It seems happy if it doesn't exist.

I had this all working on a Win2k server without needing to set anything in my script, so I want to avoid having to set any vars in my scripts as that would require rewriting them.

So what do I need to do to get this all working right?

Thanks in advance.

  • Comment on Perl picks up wrong @INC on Win2003 with Oracle

Replies are listed 'Best First'.
Re: Perl picks up wrong @INC on Win2003 with Oracle
by spiritway (Vicar) on Feb 10, 2006 at 05:28 UTC

    You might be able to include this at the beginning of the scripts:

    push @INC, '/directory/of/lib';
      Thanks for the reply. My solution at this point is to call my scripts from a batch file and to set PERL5LIB in the batch file before calling any perl.