Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: cpanplus not functioning right in a multiple-Perl installation setup?

by Khen1950fx (Canon)
on May 08, 2013 at 22:56 UTC ( [id://1032697]=note: print w/replies, xml ) Need Help??


in reply to cpanplus not functioning right in a multiple-Perl installation setup?

CPANPLUS is built on top of CPAN. The warning is telling you that, in order for the terminal to be fully functional, you need to install a few more modules. Try installing these:
#!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install(qw( Term::ReadLine Term::ReadLine::Gnu Term::UI));
Update: Corrected. Thanks to Corion for noticing my mistake.
  • Comment on Re: cpanplus not functioning right in a multiple-Perl installation setup?
  • Download Code

Replies are listed 'Best First'.
Re^2: cpanplus not functioning right in a multiple-Perl installation setup?
by Corion (Patriarch) on May 08, 2013 at 23:13 UTC

    Actually, CPANPLUS is not really based on CPAN.

    The rest of the advice still is true, except that you only need one of Term::Readline::Perl or Term::Readline::Gnu.

      The rest of the advice still is true, except that you only need one of Term::Readline::Perl or Term::Readline::Gnu.

      Sorry corion, but it isn't true :) You only need Term::ReadLine which is core, the rest are all optional, you don't need them

Re^2: cpanplus not functioning right in a multiple-Perl installation setup?
by HelenCr (Monk) on May 09, 2013 at 17:35 UTC
    Khen1950fx: I ran your program. Here is the output:

    Database was generated on Wed, 08 May 2013 21:53:13 GMT Term::ReadLine is up to date (1.10). Running install for module 'Term::ReadLine::Gnu' Running make for H/HA/HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/id/H/HA/HAYASHI/Term-ReadLine-G +nu-1.20.tar.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/id/H/HA/HAYA +SHI/CHECKSUMS Checksum for F:\...\SBPerl\cpan\sources\authors\id\H\HA\HAYASHI\Term-R +eadLine-Gnu-1.20.tar.gz ok CPAN.pm: Building H/HA/HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz Could not find neither libtermcap.a, libncurses.a, or libcurses. Warning: No success on command[F:\...\SBPerl\perl\bin\perl.exe Makefil +e.PL] HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz F:\...\SBPerl\perl\bin\perl.exe Makefile.PL -- NOT OK Stopping: 'install' failed for 'Term::ReadLine::Gnu'.

    What to do?

    Many TIA - Helen

    Update:
    I ran your program with Term::ReadLine::Perl instead of: Term::ReadLine::Gnu, and it responded with:

    Database was generated on Wed, 08 May 2013 21:53:13 GMT Term::ReadLine is up to date (1.10). Term::ReadLine::Perl is up to date (1.0303). Term::UI is up to date (0.34).

    So this looks ok.

    And now, when I run cpanp, it's not complaining that "terminal is not fully functional". Which is good.
    Correction: sorry, that problem is still there.

    But this was not the main, original problem. The main problem was, that CPANPLUS was not recognizing the new Perl installation, although I've changed the "PATH" in the right way.

    I'll try using cpanp again, and report back.

    Many thanks - Helen

      And now, when I run cpanp, it's not complaining that "terminal is not fully functional". Which is good. Correction: sorry, that problem is still there.

      Doesn't this give you pause?

      Because the steps of installing Term::ReadLine et al. were exactly to make the cpanp program shut up about not having readline functionality.

      I would, as I already recommended, make triply certain that the correct Perl is finding the correct CPANPLUS module and the correct CPANPLUS configurations and that no trace of the other Perl installation is found in:

      • The environment. See perlrun for the interesting parts.
      • Configuration files. Maybe use App::Ack or maybe use the Windows "Search in Files" facilities for offending files.

      As the setup of more than one Perl version seems to be problematic for you, maybe you want to reconsider the decision of trying to maintain two versions of Perl on the same machine?

        It turns out that the "terminal is not fully functional" warning is a known problem with the "terminal" after installing Strawberry Perl. See comment #48 here: https://groups.google.com/forum/?fromgroups=#!topic/msysgit/chXoBxQ3c0Y where he says: I had this issue after installing Strawberry Perl. See also comment #47 there.

        I deleted the TERM environment variable, and then cpanplus is not complaining: "terminal is not fully functional" any more. So this does solve that problem.

        Like I said, this leaves us with the main issue: how to make cpanplus refer to a new Perl installation only. Here is some additional information:

        %PATH%: echo %PATH% gives:

        F:\Win7programs\SBPerl\ is where I've installed Strawberry Perl 5.16.3.
        (My older 5.14.2 Perl installation is at: F:\Win7programs\Dwimperl\)

        Interestingly, from the old installation, there exists a directory structure on C:\

        C:\Documents and Settings\Helen\.cpanplus \5.14.2 \build \authors \id \install-logs

        but there is no similar sub-directory structure for the new installation: \5.16.3

        Also, strangely, even if I call cpanp like so (as Corion suggested):
        >F:\Win7programs\SBPerl\perl\bin\cpanp.bat
        it still checks the old Perl installation for the existence of modules, and writes the install log to:
        C:\Documents and Settings\Helen\.cpanplus\install-logs

        Here is a typical (one-liner) install log:
        [MSG] [Thu May  9 21:40:21 2013] Module 'Carp' already up to date, won't install without force

        IMO, the key questions here are:

        1. How does cpanp determine the location of \perl\bin and \perl\site\bin;
        2. How does cpanp determine whether a module is installed (or not)
        Is there a configuration file for cpanp? If so, where is it located?

        Many TIA - Helen

        N.B. Corion: you said: As the setup of more than one Perl version seems to be problematic for you ...etc
        Installing the second Perl installation, I do not think I have done anything less accurate or orderly that a veteran Perl system manager would have done. But Corion, more generally, I was of the opinion that the PerlMonks spirit is: The only stupid question is the question not asked, and that PerlMonks encourage exploration of the Perl eco-system, and enhancement of Perl knowledge (especially in these times, when the mass hype is to go the Python way (or Ruby, or Lua)).

        I think my posts here definitely have value, and specifically regarding this current cpanp issue, I think I have identified a bug in CPANPLUS, where it has difficulty identifying the default Perl installation in a multi-Perl installation setup.

        If my questions here constitute a nuisance, I can find other forums to gain knowledge at.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1032697]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-18 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found