1 package TestApp::Controller::Action::Detach;
4 use base 'TestApp::Controller::Action';
13 my ( $self, $c ) = @_;
14 $c->forward('TestApp::View::Dump::Request');
18 my ( $self, $c ) = @_;
19 $c->res->output('error');
23 my ( $self, $c ) = @_;
24 $c->detach('/action/detach/two');
28 sub with_args : Local {
29 my ( $self, $c, $orig ) = @_;
30 $c->detach( 'args', [qq/new/] );
33 sub with_method_and_args : Local {
34 my ( $self, $c, $orig ) = @_;
35 $c->detach( qw/TestApp::Controller::Action::Detach args/, [qq/new/] );
39 my ( $self, $c, $val ) = @_;
40 die "Expected argument 'new', got '$val'" unless $val eq 'new';
41 die "passed argument does not match args" unless $val eq $c->req->args->[0];
42 $c->res->body( $c->req->args->[0] );