From catalystgroup at unitedgames.co.uk Tue Dec 5 05:00:51 2017 From: catalystgroup at unitedgames.co.uk (Andrew) Date: Tue, 5 Dec 2017 05:00:51 -0000 Subject: [Catalyst] Find Action via Public Path. Message-ID: <000001d36d86$37a853e0$4d02a8c0@home> Hello, Hope you're all well, =). Do any of you know what the best way to find an action name, via a public path, may be? I found $c->dispatcher->get_action_by_path($path) only works for private paths internal to our app. So for example, if we have: website.com/coolpage ...I've got the string "coolpage" and I want to call the associated action within my catalyst app. I thought it would be more secure to use the string to look up a corresponding action name / subroutine, and then call that subroutine, rather than call a request for whatever happens to be in the string. Any advice, appreciated. Many thanks, Yours, Andrew M. -------------- next part -------------- An HTML attachment was scrubbed... URL: From catalystgroup at unitedgames.co.uk Tue Dec 5 20:24:42 2017 From: catalystgroup at unitedgames.co.uk (Andrew) Date: Tue, 5 Dec 2017 20:24:42 -0000 Subject: [Catalyst] Find Action via Public Path. References: <000001d36d86$37a853e0$4d02a8c0@home> Message-ID: <004501d36e07$15876ea0$4d02a8c0@home> No one has replied yet, so I've taken to accomplishing the end result I was after using this: http://wiki.catalystframework.org/wiki/wikicookbook/safedispatchusingpath Basically... my $string="coolpage"; $c->request->path($string); $c->dispatcher->prepare_action($c); $c->go($c->action, $c->request->args); ----- Original Message ----- From: Andrew To: The elegant MVC web framework Sent: Tuesday, December 05, 2017 5:00 AM Subject: [Catalyst] Find Action via Public Path. Hello, Hope you're all well, =). Do any of you know what the best way to find an action name, via a public path, may be? I found $c->dispatcher->get_action_by_path($path) only works for private paths internal to our app. So for example, if we have: website.com/coolpage ...I've got the string "coolpage" and I want to call the associated action within my catalyst app. I thought it would be more secure to use the string to look up a corresponding action name / subroutine, and then call that subroutine, rather than call a request for whatever happens to be in the string. Any advice, appreciated. Many thanks, Yours, Andrew M. ------------------------------------------------------------------------------ _______________________________________________ List: Catalyst at lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst at lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: