I started today getting a problem with visual studio code and powershell running perl scripts.
After some debugging I found that I can not get the full path of the libraries anymore. For some reason powershell in visual studio code is returning the paths without the disk letter.
I made this script files to test it:
test.pm
package Utils::test;
use strict;
use File::Basename;
use Exporter 'import';
our @EXPORT_OK = qw(test);
sub test{
print(__FILE__."\n");
}
1;
test.pl
use strict;
use File::Basename;
use Utils::test;
Utils::test->test()
In PowerShell:
In windows cmd:
In visual studio code power shell:
Both PS instances return the same versions:
Version
-------
5.1.19041.1320
I'm not sure if there was an update in Visual Studio Code since this started happening but it is right now in 1.65.0
.
I have no idea if this is an issue with powershell, perl or visual studio code.
Update: From the comments, it seems that there is a linux shell in my windows PS:
Update2: Thanks again to @ikegami it seems there are two different perls installed: