Perl DB question

S

Sara

I often want to break on the first line of a block, such as


21 while ($itsANiceDay)
22 {print "lets play outdoors\n";
23 $itsANiceDay = getWeatherReport();
24 }


I can set a breakpoint on like 21 or 23, but why not 22? It looks like
a legitimate place to break?

G
 
A

Anno Siegel

Sara said:
I often want to break on the first line of a block, such as


21 while ($itsANiceDay)
22 {print "lets play outdoors\n";
23 $itsANiceDay = getWeatherReport();
24 }


I can set a breakpoint on like 21 or 23, but why not 22? It looks like
a legitimate place to break?

Line 22 contains both the start of a new block and an executable
statement. The new block can't take a break point. Using more
conventional bracing and indenting solves it:

21 while ($itsANiceDay) {
22 print "lets play outdoors\n";
23 $itsANiceDay = getWeatherReport();
24 }

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
DewittMill
Top