Alister West

home is where your code is ...

Debugging on/off

Everneeded to quickly switch a flag somewhere in your code to turn on debugging?

make debug-on
make debug-off

Add to Makefile

debug-on:
    perl -p -i -e "s/.debug_level.*/'debug_level' => '1',/" Links/Config/Data.pm

debug-off:
    perl -p -i -e "s/.debug_level.*/'debug_level' => '0',/" Links/Config/Data.pm


# More Makefile dev stuff.
LIVE=/var/home/alister/www.alister.com
DEV=/var/home/alister/dev.alister.com
dev:
@echo "Converting RT.pm.live => RT.pm (dev)"
@cat ${DEV}/lib/RT.pm.liv | perl -pe 's/${LIVE}/${DEV}/' > ${DEV}/lib/RT.pm
By Alister West