in reply to Self Testing Modules

Now, as far as I am concerned running:
$debug && print "some code"; $debug && print "some more code"
As that is just messy.

Indeed. To make tracing code less messy, have a look at TheDamian's Smart::Comments module.