in reply to Re: Conditional Compiling
in thread Conditional Compiling

Because log(...) if LOGGING compiles to nothing given sub LOGGING () { 0 } (refer to the first parse tree in the OP), whereas, log(...) if $LOGGING would cause $LOGGING to be evaluated at runtime everytime the line is encountered. While that's probably a negligable cost, it doesn't meet the goal I set at the top of my post. That goal can be alternatively stated as "I want the if to execute at compile time instead of at run-time (while keeping the code simple)."

Replies are listed 'Best First'.
Re^3: Conditional Compiling
by Arunbear (Prior) on Nov 18, 2004 at 11:34 UTC
    Ok, I get it now. It's quite a cool technique which is also used by Carp::Assert (for disabling assertions).