Mark Stosberg wrote:
As Rhesa proposed, he has followed through and released a plugin to add the
Devel::Declare / Method::Signatures magic to CGI::Application:

http://search.cpan.org/perldoc?CGI::Application::Plugin::RunmodeDeclare

Looks like an interesting alternative to CAP::AutoRunmode. One minor irritant is having to put 'runmode foo ($c:)' everywhere (only if using $c instead of $self of course). Might be useful to be able to declare use CGI::Application::Plugin::RunmodeDeclare(invocant => '$c'), or just use CAP::RunmodeDeclare qw($c).

As an exercise I tried sub-classing it - 'use My::RunmodeDeclare' and overriding parse_proto(), substituting $c for $self in $signature{invocant}. It seems to work fine so far, and also works with CAP::AutoRunmode. Not tried it with CA::Dispatch yet though.

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to