CPAN.pm configuration

K

kj

On my system I have Perl 5.6.1 under /usr and Perl 5.8.3 under /opt
[1]. This has broken my ability to use CPAN.pm. More specifically,
almost invariably the "make test" step fails. This is because the
command that runs the test script uses flags such as -I/usr/lib/perl/5.6.1,
when it should be using -I/opt/lib/perl/5.8.3, etc. And also, even
though I bring up the CPAN shell with "/opt/bin/perl -MCPAN -e
shell", during the "make test" part the tests scripts get run with
/usr/bin/perl instead of with /opt/bin/perl (although I'm less sure
that this is the case every time).

How do I configure things such that CPAN.pm uses the Perl (executable
and libraries) that live under /opt and not the Perl under /usr?

Thanks!

kj

[1] Long story: basically, my stable-release Debian system uses
5.6.1 whenever it needs to use Perl, but I prefer to use 5.8.3;
the Perl 5.8.x distributed with Debian's testing release is compiled
with threads, which I do not want, so instead of upgrading my
system's Perl to testing, I installed 5.8.3 under /opt.
 
C

chanio

kj (comp.lang.perl.misc) dijo...
On my system I have Perl 5.6.1 under /usr and Perl 5.8.3 under /opt
[1]. This has broken my ability to use CPAN.pm. More specifically,
almost invariably the "make test" step fails. This is because the
command that runs the test script uses flags such as
-I/usr/lib/perl/5.6.1,
when it should be using -I/opt/lib/perl/5.8.3, etc. And also, even
though I bring up the CPAN shell with "/opt/bin/perl -MCPAN -e
shell", during the "make test" part the tests scripts get run with
/usr/bin/perl instead of with /opt/bin/perl (although I'm less sure
that this is the case every time).

How do I configure things such that CPAN.pm uses the Perl (executable
and libraries) that live under /opt and not the Perl under /usr?

Thanks!

kj

[1] Long story: basically, my stable-release Debian system uses
5.6.1 whenever it needs to use Perl, but I prefer to use 5.8.3;
the Perl 5.8.x distributed with Debian's testing release is compiled
with threads, which I do not want, so instead of upgrading my
system's Perl to testing, I installed 5.8.3 under /opt.

RTFM - I guess that everything that might happen to a perl user is solved by
reading the perldocs.
There is a PERLVAR (or something like this) that when it is set at your
environment, it is telling perl where to find the libraries.
Read about it first because I know by experience that it is very powerful.
I did a mess with my two Win XP perls. I finally , removed it and managed ok
just by declaring use lib ('C:\perl\lib', 'C:\perl\site\lib'); first at
every script.
In your case, I dont' know if it is going to affect your 'cpan' LINUX
command line. But surely every perl command.
At the perldoc, there are some mentions of just using the use lib when
calling the perl -MCPAN command line. You should judge by yourself.

Hope it helps!
alberto
--
.------------------. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
| ___ _ _ _ _ | ALBERTO ADRIAN SCHIANO - ARGENTINA - 2004
|/ __/ | \ || | | | <[email protected]> # 34-34S 058-25W(z-3)
|||_< \| || ' | | +------------+------------------------------
|`____/|_\_|`___' | LINUX COUNTER: 240 133 ~ machine : 119 401
| _ _ _ __ _ | +------------+----------+-------------------
|| | | \ |\ \/ | AMD Athlon 6 |RAM 512Mb.|krnl.: 2.6.3-10mdk
|| |_ | | \ \ | i586-mandrake-linux-gnu |MDK 9.2 - KDE 3.13
||___||_\_|_/\_\ | +-----------------------+-------------------
| __ __ ___ _ _ | Maxtor #4D040H2 32Gb. |DISPLAY_VGA SiS 630
|| \ \| . \| / | ------------------------+--+----------------
|| || | || \ | PCI Audio snd-trident 7018 | ViewSonic E771
||_|_|_||___/|_\_ | ---------------------------+----------------
| | http://perlmonks.org/index.pl?node_id=245320
'------------------' -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top