Commit | Line | Data |
2688734f |
1 | package TestApp::Controller::Action::Auto::Detach; |
2 | |
3 | use strict; |
4 | use base 'TestApp::Controller::Action'; |
5 | |
6 | sub auto : Private { |
7 | my ( $self, $c ) = @_; |
8 | $c->res->body( "detach auto" ); |
9 | if ($c->req->param("with_forward_detach")) { |
10 | $c->forward("with_forward_detach"); |
11 | } else { |
12 | $c->detach; |
13 | } |
14 | return 1; |
15 | } |
16 | |
17 | sub default : Path { |
18 | my ( $self, $c ) = @_; |
19 | $c->res->body( 'detach default' ); |
20 | } |
21 | |
22 | sub with_forward_detach : Private { |
23 | my ($self, $c) = @_; |
24 | $c->res->body( "detach with_forward_detach" ); |
25 | if ($c->req->param("detach_to_action")) { |
26 | $c->detach("detach_action"); |
27 | } else { |
28 | $c->detach; |
29 | } |
30 | } |
31 | |
32 | sub detach_action : Private { |
33 | my ($self, $c) = @_; |
34 | $c->res->body("detach_action"); |
35 | } |
36 | |
37 | 1; |