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

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to