Closed willt closed 1 year ago
I've created a fork of this module with Perl v5.16 compatibility, if anyone unsure how to edit it for themselves:
https://github.com/finwarman/perl-5.16-Perl-LanguageServer/releases/tag/V2.3.0
I thought for a second this would work with 5.16
as well. Got it installed with @finwarman's fork. While it mostly works, I found that the debugger didn't actually work. It would claim that the DB::DB
subroutine was not defined.
The earliest version of perl I got working with the debugger was 5.26.3
( earlier versions may work, haven't tested many but 5.18
had the same issue as 5.16
).
What I ended up doing for working on an old el7 system with 5.16 that seems to have worked is...
plenv install-cpanminus
cd /tmp/
plenv local 5.26.3
cpanm Perl::LanguageServer
cpanm URI::Escape
Now in the Settings for the VSCode Perl Extension...
Perl Cmd
to /home/$USER/.plenv/versions/5.26.3/bin/perl
$USER
to your literal username; can't use VSCode variables at the moment; see 128perl.perlInc
to the following...
$USER
to your literal username due to 128
"perl.perlInc": [
"/home/$USER/path-to-project/lib/",
"/home/$USER/.plenv/versions/5.26.3/lib/perl5/site_perl/5.26.3/x86_64-linux",
"/home/$USER/.plenv/versions/5.26.3/lib/perl5/site_perl/5.26.3",
"/home/$USER/.plenv/versions/5.26.3/lib/perl5/5.26.3/x86_64-linux",
"/home/$USER/.plenv/versions/5.26.3/lib/perl5/5.26.3",
"/usr/local/lib64/perl5",
"/usr/local/share/perl5",
"/usr/lib64/perl5/vendor_perl",
"/usr/share/perl5/vendor_perl",
"/usr/lib64/perl5",
"/usr/share/perl5"
],
lib
dirlib
dir ( this will be your core libs, Perl::Language, and any other modules you need to install here b/c older versions can't run under the 5.16
interpretter.@INC
is by default ( on an el7 system at least ); so then any modules not found in the project's lib
dir or the plenv environment will use the system libsThat seems to have gotten things working. Obviously this means that you're debugging with a different perl interpreter than the project would be using in production which could lead to interesting surprises.
Fixed in 2.5.0
I believe this works with perl 5.16 just fine. Just change 5.18 to 5.16 and remove the no experiential warnings. This will help people forced to be stuck in old perl (redhat/company policy/etc) Thoughts?