[cgiapp] RFC: declarative run modes (inspired by Method::Signatures)

Rhesa Rozendaal perl at rhesa.com
Tue Sep 23 21:28:07 EDT 2008


Jason A. Crome wrote:
> I was thinking that it would be cool just to use Method::Signatures  
> with CGI::App, and I was also considering giving CAP::AutoRunmode a  
> whirl, but this..... this is cool enough to wait for ;)

We're using AutoRunmode at work, and it rocks. It's even slightly better 
because you only need to add the "use CAP::AutoRunmode" line in your base 
class, and it'll work across all your subclasses. That's not the case with 
Method::Signatures (because the "method" keyword isn't a method itself).

> Does this play nicely with CAP::Authen and CAP::Authz? (ie, will  
> anything requiring sub attributes still work?)

No, it doesn't support attributes (yet): 
http://use.perl.org/~schwern/journal/37506
I actually asked the same question there, because I was hoping to be able to do:

    method foo :Runmode {}

using AutoRunmode, but that didn't work. So I rolled my own :)


> Don't forget to make an errormode declaration either.

Right. I'll do that.

> Great idea!!!!

Thanks :)

> Jason



More information about the cgiapp mailing list