[cgiapp] packages autouse?

Rhesa Rozendaal perl at rhesa.com
Thu Jun 11 13:26:29 EDT 2009


P Kishor wrote:
> What I do find annoying is the number steps involved in adding a new
> run mode, esp. when using CAD.
> 
> First, add the new run mode to the dispatch table.
> 
> Second, add the run mode to the setup in the module (assuming one is
> not using AutoRunmode... some problems have been alluded to using
> AutoRunmode, esp. in mod_perl environments.
> 
> Third, create the darn run mode.
> 
> Fourth, create the template for the run mode.
> 
> Dunno if there is a quicker way.

There are two that I know of: CAP::AutoRunmode and CAP::RunmodeDeclare. The 
latter is mine, but the former works great too.

I don't think you should count creating a template. After all,

     runmode hello { return "Hello world!" }

is perfectly valid.

rhesa


More information about the cgiapp mailing list