0

I need to know what will happen if we install Perl modules using CPAN when both Active & Strawberry Perl existing in same system. I have both of them installed in my windows server.
As both of them will be installed in different paths, below are my queries regarding installation of Perl modules:

  1. Which one will get updated by default? Active or Strawberry? or both?
  2. Is there a way to install modules specifically to only one of them?
  3. Will there be any difference in backend installation process for both?
  4. By default which one will be given preference if we write Perl script(Active or Strawberry)?
  5. If we install using CPAN, what will be its first preference(Active or Strawberry)?

Detailed information will be much appreciated!!

Anderson
  • 138
  • 7
Amareesh
  • 368
  • 2
  • 5
  • 19

2 Answers2

0

Whichever perl is first in the $ENV{PATH} will be the one that is installed to.

C:\>which perl
C:\strawberry\perl\bin/perl.EXE

This rule will apply to all of your questions, unless you reorder the path or specify a perl version explicitly.

To view the order of your path, just use:

C:\>perl -E "say for split /;/, $ENV{PATH}"
Miller
  • 34,962
  • 4
  • 39
  • 60
0

Which one will get updated by default?

There's no default. It will install the module for whichever Perl you use to run the installer.

If we install using CPAN, what will be its first preference(Active or Strawberry)?

On Windows systems, a wrapper named cpan.bat is created when cpan is installed. It launches cpan using "perl", so the first perl in your PATH will be used.

Is there a way to install modules specifically to only one of them?

You make sure to run cpan for the right one by using

c:\path\to\desired\bin\perl -MCPAN -e shell

Manipulating your PATH to place the desired Perl earlier should also do the trick.

Will there be any difference in backend installation process for both?

Installing it for one won't install it for the other, if that's what you're asking.

By default which one will be given preference if we write Perl script(Active or Strawberry)?

There's no default. The Perl you specify (in your path, in the file association or on the command line) will be used.

ikegami
  • 367,544
  • 15
  • 269
  • 518