... <%once> use constant LOGIN => 1; use constant LOGOUT => 2; <%init> if ($action eq LOGIN) { ...