in reply to Re^2: cpanplus not functioning right in a multiple-Perl installation setup?
in thread cpanplus not functioning right in a multiple-Perl installation setup?

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:

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?

  • Comment on Re^3: cpanplus not functioning right in a multiple-Perl installation setup?
  • Download Code

Replies are listed 'Best First'.
Re^4: cpanplus not functioning right in a multiple-Perl installation setup?
by HelenCr (Monk) on May 10, 2013 at 07:47 UTC
    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.

      Most likely, CPANPLUS stores user configuration data where all programs store user configuration data. In a directory below $ENV{USERPROFILE}. In your case, I would look at files below C:\Documents and Settings\Helen\.cpanplus.

      Most likely, the config files there reference the "other" directories. But then, I already recommended using a "search in files" facility in my previous post. My guess is that there are configuration settings in one file there that still have the values for the "other" Perl.

      My issue is not with how you installed your second Perl instance, but with your steps to diagnose the issue. The answers to your key questions are likely answered by reading the documentation of CPANPLUS. It's good that you repeat these questions here, but I think you could also find the answers. You may consider it a bug that CPANPLUS maybe follows whatever is specified in its configuration files, or that CPANPLUS only keeps one configuration file per user instead of keeping one per user-per Perl version. But you've already been told what facility of your operating system could help you find out more about where such configuration could be found, or if the "search-in-files" functionality does not work, what other approaches there are.

      You could also review the output of the installation process and check what directories are named there. This could have led you to a diagnosis at least one round of trying to install modules earlier.

      Note that by installing modules with a newer Perl version into the "other" directories, you most likely now have broken the "older" Perl installation, at least if you used the newer Perl to install modules which require a C compiler, like Wx. I recommend looking for a backup of that "other" directory.

        OK, I solved it. What needed to be done was, to clear the CPANPLUS cache (whatever that is), by entering "x" at the cpanp prompt. Apparently cpanp keeps a cache somewhere (and I don't think it's under the
        C:\Documents and Settings\UserName\.cpanplus\
        tree), and that cache contains configuration parameters, including the current (=default) Perl installation top directory.

        Also, after extensive googling, quite far away in a search result list, I have found this:


        (URL: http://cpanplus.sourceforge.net/faq.html#b)

        So, conclusions:

        1. Installing several Perl versions is ok and supported
        2. CAPNPLUS supports working in a multi-perl installation environment, but you must clear the "CPANPLUS cache" when shifting from one installation to the other (or use some other alternatives listed in that URL)
        3. CPANPLUS documentation is meager and practically non-existent. I found the URL quoted above by accident, and its parent URL is broken.

        That has been an excruciating experience. I have spent days wrestling with this.

        Many thanks to all PerlMonks trying to help, offering advice - Helen