One clue as to what's going on might be in the perl -MO=Deparse output:
The use attributes after sub a is interesting. If it reassigned *X::a that could explain weird behaviour, but it doesn't. Interesting!package X; sub BEGIN { require strict; do { 'strict'->import }; } use Attribute::Handlers; sub a { use strict 'refs'; print "a\n"; } use attributes ('X', sub { use strict 'refs'; print "a\n"; } , 'ATTR(SCALAR)'); sub b { use strict 'refs'; print "b\n"; } package main; use strict 'refs'; X::a(); X::b();
Adding a call to a routine that prints "caller" info instead of the print statements in a and b shows that the caller info is sane, and matches the expected line numbers.
In reply to Re: bug in the debugger? breakpoints in subroutines ignored if attributes present
by RMGir
in thread bug in the debugger? breakpoints in subroutines ignored if attributes present
by wu-lee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |