bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aw: Re: Re: Inline `ifdef style` debugging


From: pjodrr
Subject: Aw: Re: Re: Inline `ifdef style` debugging
Date: Wed, 28 Mar 2012 18:25:45 -0000
User-agent: G2/1.0

Am Donnerstag, 11. August 2011 14:13:27 UTC+2 schrieb Greg Wooledge:
> The problem with this is that you can't switch to the other function
> later.

this is intended.  The idea is to call a script with a debug
or no-debug option.  So for the runtime of the script the
debug() function does not change.

> Here, the first call to chatter blows away the test of $verbose, so
> the next time we call it, the fact that we've set verbose=1 is ignored.
> We're stuck in non-verbose mode forever.

if you want a different behaviour you have to test for $verbose
everytime the chatter() is called which was to be avoided.

cheers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]