sub logout { my($app)=@_; $app->authen->logout; $app->forward( $app->start_mode ); # would be nice! } instead I will declare a lexical variable for the Application package ($start_mode) and use it in both defining the start mode and forwarding to it.