richterger / Perl-LanguageServer

Language Server for Perl
Other
219 stars 53 forks source link

lvalue subs not supported in debugger #194

Open pmqs opened 9 months ago

pmqs commented 9 months ago

Consider this code (lsub.pl) that makes use of a an lvalue sub.

use strict;
use warnings;

my $v ;

sub fred: lvalue { $v }

fred = 5;
print "v=[$v]\n";

running with perl 5.38.0 it outputs this.

$ perl lsub.pl 
v=[5]

Also works with the command-line debugger.

Running the debugger with Perl-LanguageServer in vscode gives this in the Debug Console

Can't modify non-lvalue subroutine call of &DB::sub at lsub.pl line 8.

Running Perl-LanguageServer(version 2.6.1

$ perl -MPerl::LanguageServer -e 'print "$Perl::LanguageServer::VERSION\n"'
2.6.1