XPost: alt.os.linux.mint
Mike Scott <
[email protected]d> writes:
On 08/11/2023 21:04, Mike Scott wrote:
Hi all.
I've found that the perl debugger 'v' command fails since I upgraded
a while ago.
It's OK on Mint 20.3 (perl 5.30) but broken on Mint 21 (perl 5.34).
I get this:
Enter h or 'h h' for help, or 'man perldebug' for more help.
main::(/tmp/t.pl:1): print "hello\n";
DB<1> v
Undefined subroutine &DB::cmd_l called at
.....
Indeed, cmd_l is not defined in the current perl5db.pl script.
I find this really weird; somehow someone's gratuitously removed a
complete 4-line subroutine and nobody noticed.
Anyway, I copied the relevant lines from an older version, and it
seems to work now.
In perl5db.pl, add
sub cmd_l {
my (undef, $line) = @_;
return _cmd_l_main($line);
}
after the (badly worded) comment
## end sub cmd_l
(X-posted to c.l.p.misc in case anyone there is interested.)
This seems to be the relevant commit in
https://github.com/perl/perl5 :
commit b7a96fc9f5394c34d86d8b476ef4293f81ce341b
Author: [omitted]
Date: 2020-03-31 16:45:04 +1100
fix `l $var` where $var is a lexical variable
As with `i $obj` the DB::Obj in the call stack prevented DB::eval
from compiling/executing in the context of the debugged code.
I've omitted the author's name, but it's easy enough to look up.
The commit is over 5000 lines. I haven't studied the changes.
`sub cmd_l` is present in 5.33.0, absent in 5.33.1 and later and in
5.34.0 and later.
--
Keith Thompson (The_Other_Keith)
[email protected]
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)