in reply to Re: Config.pm file and @INC array
in thread Config.pm file and @INC array

Hi,
I do understand that the version of perl is quite old, but as I said, this is what my business requires currently. Can you please help me get some suggestions as to how to go after this issue.

I must say that there are currently two versions of perl installed in my system. 5.6.0 under /usr/local/bin and 5.8.3 under /usr/bin. The same can be found in the list of @INC.

What I am basically looking for is that if someone can help me know how can i modify the @INC list to add "/usr/lib/perl5/5.8.3". I guess this may solve the issue. Can you throw some light in here.


Thanks,
vikram

Replies are listed 'Best First'.
Re^3: Config.pm file and @INC array
by almut (Canon) on Feb 25, 2009 at 17:10 UTC
    how can i modify the @INC list to add "/usr/lib/perl5/5.8.3"

    You can set the environment variable PERL5LIB to add directories to @INC, but it's probably almost certainly a better idea to install the Perl libs that belong to a certain Perl version right where the respective Perl binary looks anyway (those @INC paths you see, which are hardcoded in the binary — in your case /usr/local/lib/perl5/5.8.3/...).

    (Update: and if you decide to use PERL5LIB, set it locally only for exactly the processes that need it (e.g. in wrapper scripts)...  Setting PERL5LIB globally on a system with multiple Perl versions is asking for trouble!)

Re^3: Config.pm file and @INC array
by zwon (Abbot) on Feb 25, 2009 at 19:36 UTC

    perhaps you can just create links in /usr/local:

    ln -s /usr/{,local/}lib/perl5/5.8.3 ln -s /usr/{,local/}lib/perl5/site_perl/5.8.3
      Excellent!!!

      Thanks a lot sir for this idea. The problem is resolved now. I wonder why it didn't come to my mind. :-)

      Thanks a lot all

      Excellent!!!

      I wonder why this didn't come to my mind. the issue is resolved now after creating the soft links.


      Thanks a lot all!