package MyApp::Update::Validate; sub response { my $response; if (not validated) { $response = 'Redo'; } elsif (not authenticated) { $response = 'NotAuthenticated' } elsif (not authorized) { $response = 'NotAuthorized'; } else { $response = 'HandleUpdate' # model action: update user info } $response = "MyApp::Login::$response"; return $response; }