Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设公共 URL /faq 链接到我的 Catalyst 应用程序中的私有路径 /faq/index:
package MyApp::Controller:FAQ; sub index :Path { [....]
如何从另一个控制器转发到 /faq ,即我如何知道 URL /faq 的操作是 /faq/index ?就像是:
$c->forward(c->dispatcher->get_action_by_path( "/faq" )); # does not work
我得到了 Catalyst 邮件列表的答案:
my $path = "/" . join '/', @{$c->req->args}; $c->request->path($path); $c->dispatcher->prepare_action($c); $c->detach($c->action, $c->req->args);