1 package TestApp::Controller::Root;
5 use base qw/Catalyst::Controller/;
12 sub subtest : Global {
13 my ( $self, $c ) = @_;
14 my $subreq= $c->res->body().
15 $c->subreq('/normal/4');
16 $c->res->body($subreq);
20 my ( $self, $c, $arg ) = @_;
21 $c->res->body($c->res->body().$arg);
24 sub subtest_params : Global {
25 my ( $self, $c ) = @_;
26 my $before = $c->req->params->{value};
27 my $subreq = $c->subreq('/normal/2');
28 my $after = $c->req->params->{value};
29 $c->res->body($c->res->body().$after);
32 sub subtest_req : Global {
33 my ( $self, $c ) = @_;
34 my $subreq = $c->subreq('/normal/2');
35 my $after = $c->req->uri->path;
36 $c->res->body($after);
39 sub subtest_full_response : Global {
40 my ( $self, $c ) = @_;
41 my $subreq_res = $c->subreq_res('/typesetter');
42 $c->res->body( $c->res->body() . $subreq_res->content_type );
45 sub subtest_with_params :Global {
48 $c->subrequest('/plain_param', {},
49 { content => 'foo' }));
52 sub plain_param :Global {
54 $c->res->body($c->req->params->{content});
57 sub typesetter : Global {
58 my ( $self, $c, $arg ) = @_;
59 $c->res->content_type( 'text/csv' );
60 $c->res->body($c->res->body());
63 sub doublesubtest :Global {
66 $c->subrequest('/normal/5').
67 $c->subrequest('/normal/6')
72 my ( $self, $c ) = @_;
73 $c->res->body($c->res->body().'3');