Regarding your second question
would it be possible to dynamically modify a line statement via the interactive debugger?
I also don't know.
What I do is the same trick that in the previous solution but before the
goto L
I do the "substituting" statement like in:
pp2@nereida:~/Ltesting$ perl -wd skipdeb.pl
Loading DB routines from perl5db.pl version 1.28
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(skipdeb.pl:2): my $a = 4;
DB<1> l
2==> my $a = 4;
3: my $b = 4;
4: my $c = 4;
5
6: $a = 5;
7: $a += 1;
8: L:$a = $c*$a;
9: $a = $c*$b;
10: print "$a\n";
DB<1> c 6
main::(skipdeb.pl:6): $a = 5;
DB<2> b 9
DB<3> $a = 8 # This statement substitutes the skipped ones
DB<4> goto L
main::(skipdeb.pl:9): $a = $c*$b;
DB<5> p $a
32
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.