Execute callbacks, based on the params in $request. Call this after you've displayed the form and then done $request->next.

We don't call this from within $request->next in case you need to do some processing before executing callbacks. Checking authentication is a good example of something you might be doing in between :)

By default the callbacks are cleared with ->clear_callbacks after all callbacks are processed. If you'd like, you can pass a hashref with a flag to indicate that the remaining callbacks shouldn't be cleared, like this:

$request->execute_callbacks( { no_clear_all => 1 } );

You might want to do this if, for example, you are doing some AJAX and don't want one js component clearing the callbacks of another. It is most likely a bad idea though due to the ensuing memory leak. If it makes you feel any better, you can pass "clear_executed" in the same way to clear at least some, preventing double-execution. You'd probably use both flags: