in reply to Conditional Compiling
Is there a module that already does something similiar?
I use Log::Log4perl to implement something quite similar.