CPAN.pm configuration

Discussion in 'Perl Misc' started by kj, May 25, 2004.

  1. kj

    kj Guest

    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.
    --
    NOTE: In my address everything before the period is backwards.
    kj, May 25, 2004
    #1
    1. Advertising

  2. kj

    chanio Guest

    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
    |/ __/ | \ || | | | <> # 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
    '------------------' -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
    chanio, May 27, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carl d.
    Replies:
    1
    Views:
    370
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    178
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    263
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    919
    SVCitian
    Oct 22, 2010
  5. PerlFAQ Server
    Replies:
    0
    Views:
    150
    PerlFAQ Server
    Jan 24, 2011
Loading...

Share This Page