updated pod for 5.0, added some debug to testapp.
[catagits/Catalyst-Plugin-SubRequest.git] / t / lib / TestApp.pm
1 package TestApp;
2
3 use Catalyst qw[-Engine=Test SubRequest];
4
5 __PACKAGE__->config(
6     name=>"subrequest test"
7 );
8
9 __PACKAGE__->setup();
10
11     sub begin : Private {
12         my ( $self, $c ) = @_;
13         $c->res->body('1');
14     }
15
16     sub subreq : Global {
17         my ( $self, $c ) = @_;
18         $c->log->info("self is ".  ref $self);
19         $c->log->info("Context is ". ref $c);
20         my $subreq= $c->res->body() .
21                         $c->subreq('/normal');
22         $c->res->body($subreq);
23     }
24   
25     sub normal : Global {
26         my ( $self, $c ) = @_;
27         $c->res->body($c->res->body().'2');
28     }
29     
30     sub end : Private {
31         my ( $self, $c ) = @_;
32         $c->res->body($c->res->body().'3');
33     }
34
35
36 1;