it obviously has something to do with $hasarg
No, it has to do with @DB::args.
I'm not sure why Carp think it's being overridden incompletely
It seems to indicate @DB::args needs to be adjusted somehow to compensate for the fact that caller isn't being called from where the user thinks it is being called.
[Update: The check was introduced by this commit. Read the commit message for some info. ]
The OP code is drawn from 5.14.2, but I have the same issues in 5.12.4, and the Carp code is a bit simpler there:
That's because code was added to 5.14 to identify where the bad code is located ($where).
In reply to Re: Trying to understand (caller($i))[4], a.k.a. $hasargs [diagnostic]
by ikegami
in thread Trying to understand (caller($i))[4], a.k.a. $hasargs
by Oberon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |