Forward processing to a private action or a method from a class.
If you define a class without method it will default to process().
- $c->forward('foo');
+ $c->forward('/foo');
$c->forward('index');
$c->forward(qw/MyApp::Model::CDBI::Foo do_stuff/);
$c->forward('MyApp::View::TT');
}
my $caller = caller(0);
my $namespace = '/';
- if ( $command =~ /^\/$/ ) {
+ if ( $command =~ /^\// ) {
$command =~ /^(.*)\/(\w+)$/;
$namespace = $1 || '/';
$command = $2;
$path = $1;
$absolute = 1;
}
+ $absolute = 1 if $flags{global};
my $name = $absolute ? $path : "$prefix/$path";
$c->actions->{plain}->{$name} = [ $namespace, $code ];
$c->log->debug(qq|Public "/$name" is "/$forward"|) if $c->debug;