-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Hello, I'm getting this in VSCode, interpreter throws an error here:
sub _set_breakpoint
{
. . .
local *dbline = "::_<$filename" if ($filename) ;
for (my $line = $location; $line <= $location + 10 && $location < @dbline; $line++)
{
if ($dbline[$line] != 0)
{
$dbline{$line+0} =~ s/^[^\0]*/$condition/; # <-- !!! right here !!!
return (1, undef, $line, $filename) ;
}
}
return (0, "Line $location for sub $subname is not breakable.") if ($subname) ;
return (0, "Line $location is not breakable.") ;
}In this line $dbline{$line+0} =~ s/^[^\0]*/$condition/; the $dbline initially is being a string scalar, accessing it as $dbline{$line+0} (with curly brackets) would make it a hash with a key equal to $line+0 and value undef, and only then the regex substitution would proceed, so interpreter is correct complaining about uninitialized value.
Is this by intent or there is a some sort of bug there or a simple typo?
Thank you.
Metadata
Metadata
Assignees
Labels
No labels