QM has asked for the wisdom of the Perl Monks concerning the following question:
DB<2> c 2586 main::(blah.pl:2586): 2586: my $found_cycles = 0; 2587: SOME_LABEL:
Note the colon after the label's line number. The debugger uses this hint to say this line is breakable. The label belongs to the statement after this:
2586: my $found_cycles = 0; 2587 SOME_LABEL: 2588: while (<INFILE>) 2589 {
In fact, if I just list the lines, the colons are correct. Seems to be when stopping with a continue or break they aren't.
But I'm surprised the label is displayed for the previous statement, and not the next. If I break on the while, I get this:
DB<3> c 2588 main::(blah.pl:2588): 2588: while (<INFILE>) 2589: {
Note that the opening brace is considered part of this statement (ignoring the colon, as this line isn't breakable).
Comments?
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|