Added recursive -r flag to prove example
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Engine / Response / Status.pm
1 package TestApp::Controller::Engine::Response::Status;
2
3 use strict;
4 use base 'Catalyst::Base';
5
6 sub begin : Private {
7     my ( $self, $c ) = @_;
8     $c->response->content_type('text/plain');
9     return 1;
10 }
11
12 sub s200 : Relative {
13     my ( $self, $c ) = @_;
14     $c->res->status(200);
15     $c->res->output("200 OK\n");
16 }
17
18 sub s400 : Relative {
19     my ( $self, $c ) = @_;
20     $c->res->status(400);
21     $c->res->output("400 Bad Request\n");
22 }
23
24 sub s403 : Relative {
25     my ( $self, $c ) = @_;
26     $c->res->status(403);
27     $c->res->output("403 Forbidden\n");
28 }
29
30 sub s404 : Relative {
31     my ( $self, $c ) = @_;
32     $c->res->status(404);
33     $c->res->output("404 Not Found\n");
34 }
35
36 sub s500 : Relative {
37     my ( $self, $c ) = @_;
38     $c->res->status(500);
39     $c->res->output("500 Internal Server Error\n");
40 }
41
42 1;