Thread [Win] Mehrere Perl parallel installieren: Alte und neue Perlversionen zusammen (22 answers)
Opened by GwenDragon at 2005-10-16 17:51

GwenDragon
 2005-10-16 22:22
#47409 #47409
User since
2005-01-17
14548 Artikel
Admin1
[Homepage]
user image
Na ja, natürlich geht sowas. Aber es ist nicht auf einem Server nutzbar.

Ich habe noch folgendes gefunden. Nach langer, langer Sucherei im WWW und Download einer 5.005-Version bei AS.

Quote
Installing multiple versions of Perl on the same machine

Multiple versions of Perl can easily be installed with this release of ActivePerl. For example the following configuration is supported for three installations with varying version and/or architecture.

Installation 1:

c:\perl\5.005

bin ... all perl binaries and util scripts

lib ... core modules

Installation 2:

c:\perl\5.00501

bin ... all perl binaries and util scripts

lib ... core modules

Installation 3:

c:\perl\5.00501-thread

bin ... all perl binaries and util scripts

lib ... core modules

Shared site:

c:\perl\site

lib ... global site modules location

The ActivePerl installer recognizes if you are installing in a <version>.<sub-version>* specific directory, such as 5.005 or 5.00502, and automatically moves your site directory up a level. This way multiple installations can easily share the same site libraries. Alternatively, you can use the environment or system registry variable(see below) to configure the location of a common site library.

If you run Perl at the command prompt, the script will be executed by the first Perl.exe it encounters in the list of paths in the PATH environment variable. To ensure the script is executed by the Perl build you want it to be executed by, you can specify the complete path to the Perl.exe you want to use. (typing perl -v at the command prompt will tell you which version of Perl is currently first in your PATH)

Installing ActivePerl will change your Path environment variable and may change registry settings, such as file associations, which may affect your Web server. If you want to use a previously installed copy of Perl, you will need to modify these settings.
Changing the default location of your Perl modules

@INC can be configured by adding semi-colon separated directory names to the following variables. See belowfor precedence:

PERLLIB environment variable

PERL5LIB environment variable

\\HKLM\Software\Perl\lib-{$]}

\\HKLM\Software\Perl\sitelib-{$]}

\\HKLM\Software\Perl\lib

\\HKLM\Software\Perl\sitelib

** {$]} is the Perl variable containing Perl's version, sub-version and patch level

The following values are defined in the algorithm for building @INC:

$Reg_Lib_Version = the actual value of \\HKLM\Software\Perl\lib-{$]}

$Reg_Site_Version = the actual value of \\HKLM\Software\Perl\sitelib-{$]}

$Reg_Lib = the actual value of \\HKLM\Software\Perl\lib

$Reg_Site = the actual value of \\HKLM\Software\Perl\sitelib

$Perl_Dir = the directory into which Perl was installed and contains 'bin' and 'lib' directories

$Arch = Perl architecture ex. 'MSWin32-x86-object', 'MSWin32-ALPHA-object'

$Perl_Version = Complete Perl <version>.<sub-version> with no patch level ex. $Perl_Version == 5.005 for Perl 5.005_02

The algorithm for building @INC is as follows:

# This gets rid of a version in the path if one exists

($Perl_Site) = ($Perl_Dir =~ /(.*?)(?:[\/\\]$Perl_Version.*)?$/);

$Perl_Site .= '/site';

push @INC, split /;/, ($ENV{PERL5LIB} || $ENV{PERLLIB});

push @INC, split /;/, ($Reg_Lib_Version || $Reg_Lib);

push @INC, ("$Perl_Dir/lib/$Arch", "$Perl_Dir/lib);

push @INC, ("$Perl_Site/$]/lib/$Arch", "$Perl_Site/$]/lib");

push @INC, split /;/, ($Reg_Site_Version || $Reg_Site);

push @INC, ("$Perl_Site/lib/$Arch", "$Perl_Site/lib");

push @INC, '.';
Quelle: ActivePerl 522 Install Notes
Das mit der Registry gilt auch für neuere Perl-Versionen von AS 5.6.1 und 5.8.3.

In Server-Skripten rufe ich dann eh verschiedene Shebangs auf, das müsste dann klappen.
Hoffe ich.

Somit können mehrere Versionen nebeneinander laufen.
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread [Win] Mehrere Perl parallel installieren: Alte und neue Perlversionen zusammen