[Catalyst] checking if an action exists before forwarding

Jim Spath jspath at pangeamedia.com
Tue Mar 18 18:51:24 GMT 2008


What is the "right" way to check if an action exists before forwarding 
to it?

I have found the following code to work for me:

if ($c->dispatcher->get_action_by_path($some_action_path)) {
   $c->forward($some_action_path);
}

Is there a better way?

Thanks!
Jim



More information about the Catalyst mailing list