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

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

by HelenCr (Monk)
on May 10, 2013 at 07:47 UTC ( #1032909=note: print w/replies, xml ) Need Help??

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

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:!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:

C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; F:\Win7programs\SBPerl\perl\bin; F:\Win7programs\SBPerl\perl\site\bin; F:\Win7programs\SBPerl\c\bin; C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\; C:\Program Files\Microsoft SQL Server\100\Tools\Binn\; C:\Program Files\Microsoft SQL Server\100\DTS\Binn\; C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Com +mon7\IDE\; C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\; C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common; F:\Win7programs\Python25; F:\Win7programs\TortoiseSVN\bin; F:\Win7programs\cygwin\bin; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\ (newlines added for legibility)

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):
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.

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

    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:


      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

        2) .... but you must clear the "CPANPLUS cache" when shifting from one installation to the other (or use some other alternatives listed in that URL)

        No you don't. Unless you go out of your way to disable automatic index refreshing, refreshing indexes isn't needed, it happens automatically when necessary.

        3) CPANPLUS documentation is meager and practically non-existent. I found the URL quoted above by accident, and its parent URL is broken.

        Not true, this conclusion isn't supported by reality.

        That page you found via googling is dated from 2002, 11 years ago. It is outdated and obsolete.

        The cpanp/CPANPLUS/File::Fetch documentation is current , complete, comprehensive.

        it shows (the same as cpanp help )  x                   # reload CPAN indices

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032909]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2017-03-01 18:56 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (428 votes). Check out past polls.