Leser: 15
|< 1 2 3 >| | 23 Einträge, 3 Seiten |
QuoteQuelle: ActivePerl 522 Install NotesInstalling 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, '.';
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
E:\PERL_PRGS\test>set path=D:\UTIL\PERL.580\bin\;
E:\PERL_PRGS\test>set pa
path=D:\UTIL\PERL.580\bin\;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PL;
E:\PERL_PRGS\test>dir
Datenträger in Laufwerk E: ist E_HDD
Datenträgernummer: 9CF6-682B
Verzeichnis von E:\PERL_PRGS\test
17.10.2005 15:41 <DIR> .
17.10.2005 15:41 <DIR> ..
17.10.2005 15:41 <DIR> $log_dest
17.10.2005 15:41 <DIR> 2
17.10.2005 15:38 38 perl_ver.pl
1 Datei(en) 38 Bytes
4 Verzeichnis(se), 12.607.303.680 Bytes frei
E:\PERL_PRGS\test>perl_ver.pl
This is perl, v5.8.6 built for MSWin32-x86-multi-thread
(with 3 registered patches, see perl -V for more detail)
Copyright 1987-2004, Larry Wall
Binary build 811 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Dec 13 2004 09:52:01
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
E:\PERL_PRGS\test>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
E:\PERL_PRGS\test>set path=P:\CUTE_FUTURE\ARINC\USERS\LH\NT\TOOLS\PERL\BIN\;
E:\PERL_PRGS\test>dir
Datenträger in Laufwerk E: ist E_HDD
Datenträgernummer: 9CF6-682B
Verzeichnis von E:\PERL_PRGS\test
17.10.2005 15:41 <DIR> .
17.10.2005 15:41 <DIR> ..
17.10.2005 15:41 <DIR> $log_dest
17.10.2005 15:41 <DIR> 2
17.10.2005 15:38 38 perl_ver.pl
1 Datei(en) 38 Bytes
4 Verzeichnis(se), 12.607.303.680 Bytes frei
E:\PERL_PRGS\test>perl_ver.pl
This is perl, v5.6.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2000, Larry Wall
Binary build 616 provided by ActiveState Tool Corp. http://www.ActiveState.com
Built 13:47:17 Jul 14 2000
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
E:\PERL_PRGS\test>
|< 1 2 3 >| | 23 Einträge, 3 Seiten |