Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: No Pause on Elsif in Debugger

by matija (Priest)
on Jul 23, 2004 at 05:10 UTC ( #376799=note: print w/replies, xml ) Need Help??


in reply to Re: No Pause on Elsif in Debugger
in thread No Pause on Elsif in Debugger

Um, you're missing something, too. Take the code:
if ( 0 ) { warn "a"; } elsif (1) { warn "b"; } else { warn "c"; }
You will see this execution:
main::(/tmp/foo:12): if ( 0 ) { DB<1> n main::(/tmp/foo:15): warn "b"; DB<1> n b at /tmp/foo line 15.
So in an elsif chain, you always see just the first condition, not the first matching condition as your post states.

20040725 Edit by ysth: correct <code> to </code>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://376799]
help
Chatterbox?
Discipulus a missing semicolon after use LWP::UserAgent caused very strange behaviour and not the normal warning...
[choroba]: Yes, sometimes missing ; after the use clause just interprets the next line somehow and passes the result to the used module which could happily ignore it. Been there, seen that.
[Discipulus]: luckly the program was 20 lines!

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2017-02-28 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (398 votes). Check out past polls.