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

Hello, everybody! I have Mandrake Linux, version 9.1. I installed Perl 5.8.8 (I failed to do it from CPAN, I did it manually from .tar.gz - file, and this was successful. But I didn't remove my previous Perl-version, and now I cannot run any script with my old installed modules. Those scripts worked successfully with Perl 5.8.0. I tried to re-install a couple of modules through cpan, even force install - they still don't work. When I run a script:
#!/usr/local/bin/perl use LWP::UserAgent;
I have:
$perl test2.pl Can't locate LWP/UserAgent.pm in @INC (@INC contains: /usr/local/lib/p +erl5/5.8ocal/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i68 +6-linux /usr/local/5.8.8 /usr/local/lib/perl5/site_perl .) at test2.p +l line 2. BEGIN failed--compilation aborted at test2.pl line 2.
What to do with this? Many thanks in advance! Dear all, What I had after perl -V:

$perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.4.21-0.13mdk, archname=i686-linux uname='linux natasha.mail.ru 2.4.21-0.13mdk #1 fri mar 14 15:08:06 + est 2003 i686 unknown unknown gnulinux ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)', +gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.1.so, so=so, useshrplib=false, libperl=libperl. +a gnulibc_version='2.3.1' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Nov 21 2006 16:56:10 @INC: /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .
What address I have to give for the previous version? Many thanks!

Dear Rob, It turned out, I don't have Perl 5.8.0 at this location. What this means?

[root@natasha 5.8.8]# mv /usr/local/lib/perl5/site_perl/5.8.8 /usr/loc +al/lib/perl5/site_perl/OLD_5.8.8 [root@natasha 5.8.8]# mv /usr/local/lib/perl5/site_perl/5.8.0 /usr/loc +al/lib/perl5/site_perl/5.8.8 mv: cannot stat `/usr/local/lib/perl5/site_perl/5.8.0': No such file o +r directory

Replies are listed 'Best First'.
Re: How to access 5.8.0 - Perl-modules in Perl 5.8.8 - what to change?
by davorg (Chancellor) on Nov 24, 2006 at 14:09 UTC

    Others have pointed out how you'll have to change the library search path. But I wanted to point out that Mandriva probably have a pre-packaged version of Perl 5.8.8 that you can install using their standard package management system (but unfortunately, I don't know enough about Mandriva to advise you on what that is or how you us it).

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re: How to access 5.8.0 - Perl-modules in Perl 5.8.8 - what to change?
by shmem (Chancellor) on Nov 24, 2006 at 13:48 UTC

    This is the sort of questions where the output of perl -V would really help. Please post it.

    You could set the environment variable PERL5LIB to your current perl's search path, appending the search path of perl-5.8.0 and try with that.

    run perl -V to see the contents of @INC; see perlrun.

    When building perl, you are asked if you want to include any previous version's search path into the current one; you could rebuild perl and do that. But without seeing how you configured and installed perl, it's difficult to give more advice.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: How to access 5.8.0 - Perl-modules in Perl 5.8.8 - what to change?
by syphilis (Archbishop) on Nov 24, 2006 at 13:59 UTC
    Hi,
    If you're just after a rough hack, and if /usr/local/lib/perl5/site_perl/5.8.8/i686-linux is empty and /usr/local/lib/perl5/site_perl/5.8.8 contains only the (empty) i686-linux directory, then you could rename the /usr/local/lib/perl5/site_perl/5.8.8 directory (to hide it from the system), and then rename /usr/local/lib/perl5/site_perl/5.8.0 to /usr/local/lib/perl5/site_perl/5.8.8.

    But, if there are already files in /usr/local/lib/perl5/site_perl/5.8.8 then you might lose something you want.

    I personally build from source on Mandrake Linux (also 9.1) - if you had done the same then /usr/local/lib/perl5/site_perl/5.8.0/i686-linux and /usr/local/lib/perl5/site_perl/5.8.0 would have been added to @INC and there would be no problem. I would have thought the same could be done with rpm packages - but I don't have any experience of them wrt perl.

    Cheers,
    Rob