Perl-LanguageServer icon indicating copy to clipboard operation
Perl-LanguageServer copied to clipboard

lvalue subs not supported in debugger

Open pmqs opened this issue 1 year ago • 0 comments

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

pmqs avatar Sep 19 '23 11:09 pmqs