Syntax::Feature::CatalystAction - Provide an action keyword to Catalyst Controllers
package MyApp::Web::Controller::Foo; use Moose; use namespace::autoclean; use syntax 'catalyst_action'; extends 'Catalyst::Controller'; action my_action($arg) : Path('my_special_action') Args(1) { $ctx->response->body('Look ma, no "my ($self, $ctx, $arg) = @_;" } __PACKAGE__->meta->make_immutable;
This module is a syntax compatible wrapper for CatalystX::Syntax::Action. Please see that module for documentation and examples. The main reason you might wish to use this instead is that it makes it easier to install multiple syntax extensions at once. For example:
package MyApp::Web::Controller::Foo; use Moose; use syntax qw(method function catalyst_action); extends 'Catalyst::Controller'; action my_action: Action { ... } method my_method { ... return function($arg1, $arg2) { ... }; }
John Napiorkowski email:jjnapiork@cpan.org
Catalyst, Syntax::Feature::Method, syntax, Devel::Declare
Copyright 2011, John Napiorkowski email:jjnapiork@cpan.org
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install CatalystX::Syntax::Action, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::Syntax::Action
CPAN shell
perl -MCPAN -e shell install CatalystX::Syntax::Action
For more information on module installation, please visit the detailed CPAN module installation guide.