Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] perldebguts: lvalue subroutine and &DB::lsub #17412

Open
KES777 opened this issue Jan 8, 2020 · 2 comments
Open

[doc] perldebguts: lvalue subroutine and &DB::lsub #17412

KES777 opened this issue Jan 8, 2020 · 2 comments

Comments

@KES777
Copy link
Contributor

KES777 commented Jan 8, 2020

Where
https://metacpan.org/pod/perldebguts#Debugger-Internals

If the call is to an lvalue subroutine, and &DB::lsub is defined &DB::lsub(args) is called instead, otherwise falling back to &DB::sub(args).

Description
when my debugger defines DB::sub and does not DB::lsub the next error occur:

Can't modify non-lvalue subroutine call of &DB::sub at

So if my debugger does not define DB::lsub subroutine then this is impossible to debug scripts with lvalue subroutines.

Probably perl should not try to debug lvalue subroutine call if required DB::lsub is not defined.
Just like debugging does not occur for ordinal subs if DB::sub is not defined

Or we should fix otherwise falling back to &DB::sub(args). part of the sentence, because falling back to DB::sub sub for DB::lsub is meaningless because of error

perl v5.24.1

@KES777
Copy link
Contributor Author

KES777 commented Jan 8, 2020

probably related to #13264.
DB::lsub should not relay on DB::sub, because theirs behavior are different.

@KES777
Copy link
Contributor Author

KES777 commented Jan 8, 2020

as workaround I define lsub subroutine: sub DB::lsub : lvalue { &$DB::sub }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant