sub three : Local {
my ( $self, $c ) = @_;
- $c->forward('four');
+ $c->forward($self, 'four');
}
sub four : Private {
sub five : Local {
my ( $self, $c ) = @_;
- $c->forward('TestApp::View::Dump::Request');
+ $c->forward('View::Dump::Request');
}
-
sub jojo : Local {
my ( $self, $c ) = @_;
$c->forward('one');
- $c->forward('three');
+ $c->forward($c->controller('Action::Forward'), 'three');
}
-
sub inheritance : Local {
my ( $self, $c ) = @_;
$c->forward('/action/inheritance/a/b/default');
sub global : Local {
my ( $self, $c ) = @_;
- $c->forward( '/global_action' );
+ $c->forward('/global_action');
}
sub with_args : Local {
my ( $self, $c, $orig ) = @_;
- $c->forward( 'args',[qq/new/] );
+ $c->forward( 'args', [qq/new/] );
$c->res->body( $c->req->args->[0] );
}
die "passed argument does not match args" unless $val eq $c->req->args->[0];
}
+sub args_embed_relative : Local {
+ my ( $self, $c ) = @_;
+ $c->forward( 'embed/ok' );
+}
+
+sub args_embed_absolute : Local {
+ my ( $self, $c ) = @_;
+ $c->forward( '/action/forward/embed/ok' );
+}
+
+sub embed : Local {
+ my ( $self, $c, $ok ) = @_;
+
+ $ok ||= 'not ok';
+ $c->res->body( $ok );
+}
+
1;