Yeah, this is a good practice but adds an extra branch for every debug check. When I do this in C++ I use compiler directives to remove my debug code so that I don't bog down the final product. I wonder if Perl is smart enough to optimize out those branches when it compiles? This is more likely with KM's technique because Perl will inline the constant function.