Merge remote branch 'origin/no_state_in_engine'
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Dump.pm
1 package TestApp::Controller::Dump;
2
3 use strict;
4 use base 'Catalyst::Controller';
5
6 sub default : Action {
7     my ( $self, $c ) = @_;
8     $c->forward('TestApp::View::Dump');
9 }
10
11 sub env : Action Relative {
12     my ( $self, $c ) = @_;
13     $c->stash(env => $c->req->env);
14     $c->forward('TestApp::View::Dump::Env');
15 }
16
17 sub env_on_engine : Action Relative {
18     my ( $self, $c ) = @_;
19     $c->stash(env => $c->engine->env);
20     $c->forward('TestApp::View::Dump::Env');
21 }
22
23 sub request : Action Relative {
24     my ( $self, $c ) = @_;
25     $c->req->params(undef); # Should be a no-op, and be ignored.
26                             # Back compat test for 5.7
27     $c->forward('TestApp::View::Dump::Request');
28 }
29
30 sub response : Action Relative {
31     my ( $self, $c ) = @_;
32     $c->forward('TestApp::View::Dump::Response');
33 }
34
35 sub body : Action Relative {
36     my ( $self, $c ) = @_;
37     $c->forward('TestApp::View::Dump::Body');
38 }
39
40 1;