if ($self->_test_mode) { # test_code } else { # production code, not tested }