Skip to content

Commit b5516a1

Browse files
committed
Store the currently running (per shell) version of Perl in the
PSPERL_CURRENT environment variable. This is in preparation for some work on adding a lib command for local library usage a la perlbrew.
1 parent eed5153 commit b5516a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PSPerl.ps1

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class PSPerl {
9999
if (Test-Path 'env:PERL_MM_OPT') { Remove-Item env:\PERL_MM_OPT }
100100
if (Test-Path 'env:PERL_MB_OPT') { Remove-Item env:\PERL_MB_OPT }
101101
if (Test-Path 'env:PERL_LOCAL_LIB_ROOT') { Remove-Item env:\PERL_LOCAL_LIB_ROOT }
102+
if (Test-Path 'env:PSPERL_CURRENT') { Remove-Item env:\PSPERL_CURRENT }
102103

103104
# Write-Output "Path to PSPerl is: $($this.rootPath)"
104105
# Go through the PATH and remove Perl-related items
@@ -249,6 +250,7 @@ class PSPerl {
249250
throw "$($perl_install) isn't yet installed. Try installing it.";
250251
}
251252
$this.ClearEnvironment();
253+
$env:PSPERL_CURRENT = $perl_install;
252254
$env:PATH = "$($this.rootPath);$($env:PATH)";
253255
# which perl will we be using?
254256
[string]$path = "$($this.rootPath)\_perls\$($perl_install)";

0 commit comments

Comments
 (0)