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