[cgiapp] New Plugin: RunmodeDeclare
Rhesa Rozendaal
perl at rhesa.com
Mon Oct 20 10:11:25 EDT 2008
Richard Jones wrote:
> 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).
Version 0.03 is on CPAN now, and adds this feature:
use CGI::Application::Plugin::RunmodeDeclare invocant => '$c';
runmode foo { $c->bar }
It also incorporates the suggestion by Mark and Michael to first default to
$app->param, then to $query->param.
I haven't yet incorporated any of the newer goodies in Method::Signatures,
because I want to wait for both that module and MooseX::Method::Signatures to
stabilize a bit. If there's anything in their signature handling you'd like to
see now, give me a holler.
rhesa
More information about the cgiapp
mailing list