1 package Test::Catalyst::Action::REST::Controller::Actions;
3 use namespace::autoclean;
5 BEGIN { extends qw/Catalyst::Controller::REST/ }
7 __PACKAGE__->_action_class('Test::Action::Class');
9 sub begin {} # Don't need serialization..
11 sub test : Local : ActionClass('+Catalyst::Action::REST') {
12 my ( $self, $c ) = @_;
13 $c->res->header('X-Was-In-TopLevel', 1);
16 sub test_GET : Private {
17 my ( $self, $c ) = @_;
21 sub test_POST : Action {
22 my ( $self, $c ) = @_;
23 $c->res->body('POST');
26 sub test_PUT :ActionClass('+Test::Action::Class::Sub') {
27 my ( $self, $c ) = @_;
31 sub test_DELETE : Local {
32 my ( $self, $c ) = @_;
33 $c->res->body('DELETE');
36 sub test_OPTIONS : Path('foobar') {
37 my ( $self, $c ) = @_;
39 $c->res->body('OPTIONS');
42 sub other_test :Local :ActionClass('+Catalyst::Action::REST') {
43 my ( $self, $c ) = @_;
44 $c->res->header('X-Was-In-TopLevel', 1);
48 my ( $self, $c ) = @_;
53 my ( $self, $c ) = @_;
54 $c->res->body('POST');
57 sub other_test_PUT :ActionClass('+Test::Action::Class::Sub') {
58 my ( $self, $c ) = @_;
62 sub other_test_DELETE {
63 my ( $self, $c ) = @_;
64 $c->res->body('DELETE');
67 sub other_test_OPTIONS {
68 my ( $self, $c ) = @_;
70 $c->res->body('OPTIONS');
73 sub yet_other_test : Local : ActionClass('+Catalyst::Action::REST') {}
75 sub yet_other_test_POST {
76 my ( $self, $c ) = @_;
77 $c->res->body('POST');
80 sub end : Private {} # Don't need serialization..