File: REST.pm

package info (click to toggle)
libcatalyst-plugin-smarturi-perl 0.041-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 156 kB
  • sloc: perl: 285; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package TestApp::Controller::REST;

use parent 'Catalyst::Controller';
use Class::Load ();

eval { Class::Load::load_class('Catalyst::Action::REST') } && eval q{
    sub foo : Global ActionClass('REST') {}

    sub foo_GET {
        my ($self, $c) = @_;

# should break if request_class is not set correctly
        $c->req->accepted_content_types;

        $c->res->output($c->req->uri_with({foo => 'bar'}));
    }
};

1;