in reply to Debugger Questions - Variable Scope
You could use actions to set and unset a global variable holding a ref to the variable to be watched:
something like the following watches between the lines 10 and 13 only!
DB<2> a 10 $WATCH=\$t DB<3> a 13 $WATCH=\undef DB<4> w ${$WATCH}
IMHO you could even define your own alias in .perldb to automate this.
something like rw 10-13 $t for "regional watch".
Tye's remarks about weakening to avoid leaks are still valid...
Cheers Rolf
( addicted to the Perl Programming Language)
|
---|