1 package TestApp::Controller::Action::Forward;
4 use base 'TestApp::Controller::Action';
12 my ( $self, $c ) = @_;
17 my ( $self, $c ) = @_;
18 $c->forward( $self, 'four' );
22 my ( $self, $c ) = @_;
23 $c->forward('/action/forward/five');
27 my ( $self, $c ) = @_;
28 $c->forward('View::Dump::Request');
32 my ( $self, $c ) = @_;
34 $c->forward( $c->controller('Action::Forward'), 'three' );
37 sub inheritance : Local {
38 my ( $self, $c ) = @_;
39 $c->forward('/action/inheritance/a/b/default');
44 my ( $self, $c ) = @_;
45 $c->forward('/global_action');
48 sub with_args : Local {
49 my ( $self, $c, $orig ) = @_;
50 $c->forward( 'args', [qq/new/] );
51 $c->res->body( $c->req->args->[0] );
54 sub with_method_and_args : Local {
55 my ( $self, $c, $orig ) = @_;
56 $c->forward( qw/TestApp::Controller::Action::Forward args/, [qq/new/] );
57 $c->res->body( $c->req->args->[0] );
60 sub to_action_object : Local {
61 my ( $self, $c ) = @_;
62 $c->forward($self->action_for('embed'), [qw/mtfnpy/]);
66 my ( $self, $c, $val ) = @_;
67 die "Expected argument 'new', got '$val'" unless $val eq 'new';
68 die "passed argument does not match args" unless $val eq $c->req->args->[0];
71 sub args_embed_relative : Local {
72 my ( $self, $c ) = @_;
73 $c->forward('embed/ok');
76 sub args_embed_absolute : Local {
77 my ( $self, $c ) = @_;
78 $c->forward('/action/forward/embed/ok');
82 my ( $self, $c, $ok ) = @_;
88 sub class_forward_test_action : Local {
89 my ( $self, $c ) = @_;
90 $c->forward(qw/TestApp class_forward_test_method/);
93 sub forward_to_uri_check : Local {
94 my ( $self, $c ) = @_;
95 $c->forward( 'Action::ForwardTo', 'uri_check' );