Well, you might want to consider doing it with the constant
pragma.
use constant DEBUG => 1;
I tend to alternate between that and simply testing $^W:
print qq(\$foo is "$foo"\n) if $^W;
IMO, -w should never be enabled in production code (except
insofar as you think you might forget to reenable it when
you start development again!) so this works well.