Skip Menu |

This queue is for tickets about the Perl-LanguageServer CPAN distribution.

Report information
The Basics
Id: 133349
Status: new
Priority: 0/
Queue: Perl-LanguageServer

People
Owner: GRICHTER [...] cpan.org
Requestors: HJANSEN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.1.0
Fixed in: (no value)



Subject: Minor problem in VSCode
Tried to edit a lone Perl module outside a workspace environment in a freshly installed VSCode. Running the LanguageServer led to the following error being reported in the VSCode output pane: LS: ERROR: Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.30.1/Perl/LanguageServer/Methods/workspace.pm line 82. This can easily be fixed with the patch I've attached to this report.
Subject: patch
Download patch
application/octet-stream 642b

Message body not shown because it is not plain text.

Sorry, should have added a extension to the patch file name.
Subject: patch.txt
--- lib/Perl/LanguageServer/Methods/workspace.pm.orig 2020-09-17 11:27:26.748507075 +0200 +++ lib/Perl/LanguageServer/Methods/workspace.pm 2020-09-17 11:27:53.321220494 +0200 @@ -79,7 +79,7 @@ print STDERR "ignore_dir = ", dump ( $workspace -> ignore_dir), "\n" ; - if (!exists ($workspace -> config -> {workspaceFolders}) || @{$workspace -> config -> {workspaceFolders}} == 0) + if (!exists ($workspace -> config -> {workspaceFolders}) || @{$workspace -> config -> {workspaceFolders} // []} == 0) { $workspace -> config -> {workspaceFolders} = [{ uri => $workspace -> config -> {rootUri} }] ; }