This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix C<i $obj> where $obj is a lexical
authorTony Cook <tony@develop-help.com>
Mon, 30 Mar 2020 05:32:46 +0000 (16:32 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 10 Aug 2020 04:47:53 +0000 (04:47 +0000)
commitb334474a337421c6643b872388245fb2c11bf995
tree54ad3892922256baa57f6b9981fa360c71b0403e
parent55507ac1d99efa7f407df8ebcf9f6683532679f8
fix C<i $obj> where $obj is a lexical

the DB::eval function depends on the special behaviour of eval ""
within the DB package, which evaluates the string within the context
of the first non-DB sub or eval scope, working up the call stack.

The debugger refactor moved handling for the 'i' command from the
DB package to the DB::Obj package, so the eval in DB::eval was
working in the context of the DB::Obj::cmd_i function, not in the
calling scope.

Fixed by moving the handling for the i command back to DB.

Fixes #17661.
MANIFEST
lib/perl5db.pl
lib/perl5db.t
lib/perl5db/t/gh-17661 [new file with mode: 0644]