in reply to Style: buried variables or double referencing?
use Carp::Assert; assert ($some_variable eq 'x' or $some_variable eq 'y') if DEBUG; [download]
...before we enter this piece of code.
-Andrew.