in reply to Identifying a location with finer granularity than a line number
WOW
I understand that Perl's breakpoint mechanism works only on a line bases at the level of support from the runtime.
Nope. From perldebug
Subname can be Some::Package::Name::subnameb Sets breakpoint on current line b [line] [condition] Set a breakpoint before the given line. If a condition is specified, it's evaluated each time the statement is reached: a breakpoint is taken only if the condition is true. Breakpoints may only be set on lines that begin an executable statement. Conditions don't use "if": b 237 $x > 30 b 237 ++$count237 < 11 b 33 /pattern/i b subname [condition] Set a breakpoint before the first line of the named subroutine. *subname* may be a variable containing a code reference (in this case *condition* is not supported). b postpone subname [condition] Set a breakpoint at first line of subroutine after it is compiled. b load filename Set a breakpoint before the first executed line of the *filename*, which should be a full pathname found amongst the %INC values. b compile subname Sets a breakpoint before the first statement executed afte +r the specified subroutine is compiled.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Identifying a location with finer granularity than a line number
by rockyb (Scribe) on Aug 14, 2012 at 08:39 UTC |