Fixed situation where a detach($action) from a forward within auto was not breaking...
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Auto / Detach.pm
CommitLineData
2688734f 1package TestApp::Controller::Action::Auto::Detach;
2
3use strict;
4use base 'TestApp::Controller::Action';
5
6sub 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
17sub default : Path {
18 my ( $self, $c ) = @_;
19 $c->res->body( 'detach default' );
20}
21
22sub 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
32sub detach_action : Private {
33 my ($self, $c) = @_;
34 $c->res->body("detach_action");
35}
36
371;