The purpose of this module is to add a continue method to your app that will start a Continuity-based web server when invoked. To use this module, pass the string 'On::Continuity' to the use statement that loads your Squatting app.

Here, the code is dropping down to the Continuity level. The $cr variable contains a Continuity::Request object, and with that in hand, we can try something as audacious as an infinite loop. However, this while loop does not spin out of control and eat up all your CPU. The $cr->next statement will pause execution of the current coroutine, and it will wait until the next HTTP request to come in. Thus, you can hit reload multiple times and watch $i increment each time.

However, not just any HTTP request will wake this coroutine up. To make $cr->next stop blocking, a request with the following properties will have to come in.

When you're squatting on Continuity, you're allowed to define your controllers with a queue attribute. It should contain a hashref where the keys are HTTP methods (in lower case) and the values are unique strings that will be used internally by Continuity to differentiate one queue of requests from another.

Every method mentioned in queue will be given its own coroutine to run in.