use Carp::Assert; assert ($some_variable eq 'x' or $some_variable eq 'y') if DEBUG;