in reply to bug in the debugger? breakpoints in subroutines ignored if attributes present
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: bug in the debugger? breakpoints in subroutines ignored if attributes present
by dragonchild (Archbishop) on Apr 23, 2007 at 15:21 UTC |