
The cgi::application::plugin::autorunmode plugin for cgi::application provides easy ways to setup run modes. you can just write the method that implements a run mode. you do not have to explicitly register it with cgi::application anymore.
you can either flag methods in your cgi::app subclass with the "runmode" or "startrunmode" attributes or simply declare that every method in a class is a run mode. you can also assign a delegate object, all whose methods will become runmodes. you can also mix both approaches.