On Mon, Apr 23, 2018 at 01:24:11AM -0700, KES via RT wrote: > Yes, It is implemented in this way. But to my mind it would be more consistent > if __PACKAGE__, __LINE__ would be bound to COP > > Thus if we look at N frames up the `p __LINE__` will show user's script line and not debugger's eval. > > This is minor, but looks more expected If I understand you correctly, you're wanting __LINE__etc to be changed from compile-time constants to run-time functions? Even so, I don't see how that will help make 'p __LINE__' in the debugger display an arbitrary caller's frame location - the current COP is still at a line in perl5db.pl. > Also when evaluating at users context, it is eval at first non-DB frame. > > Just like: 'eval EXPR, 0'. It would be cool if eval in debugger mode > (-d) will accept second argument which means stack frame number from > TOP. And evaluates given EXPR at given frame. By 'eval in debugger mode', are you referring to the 'x' debugger command, or perl's built-in 'eval' function, or something else? I'm afraid I don't understand what you're proposing. -- Little fly, thy summer's play my thoughtless hand has terminated with extreme prejudice. (with apologies to William Blake)Thread Previous