<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>No one has replied yet, so I've taken to accomplishing the end
result I was after using this:</FONT></DIV>
<DIV><FONT size=2><A
href="http://wiki.catalystframework.org/wiki/wikicookbook/safedispatchusingpath">http://wiki.catalystframework.org/wiki/wikicookbook/safedispatchusingpath</A></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Basically...</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> my
$string="coolpage";<BR> $c->request->path($string);<BR> $c->dispatcher->prepare_action($c);<BR> $c->go($c->action,
$c->request->args);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=catalystgroup@unitedgames.co.uk
href="mailto:catalystgroup@unitedgames.co.uk">Andrew</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=catalyst@lists.scsys.co.uk
href="mailto:catalyst@lists.scsys.co.uk">The elegant MVC web framework</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, December 05, 2017 5:00
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Catalyst] Find Action via
Public Path.</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Hello,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Hope you're all well, =).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Do any of you know what the </FONT><FONT size=2>best
way to find an action name, via a public path, may be?</FONT></DIV>
<DIV><FONT size=2>I found $c->dispatcher->get_action_by_path($path) only
works for private paths internal to our app.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>So for example, if we have:</FONT></DIV>
<DIV><FONT size=2>website.com/coolpage</FONT></DIV>
<DIV><FONT size=2>...I've got the string "coolpage" and I want to call the
associated action within my catalyst app.</FONT></DIV>
<DIV><FONT size=2>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.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Any advice, appreciated.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Many thanks,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Yours,</FONT></DIV>
<DIV><FONT size=2>Andrew M.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>List:
Catalyst@lists.scsys.co.uk<BR>Listinfo:
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<BR>Searchable
archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/<BR>Dev site:
http://dev.catalyst.perl.org/<BR></BLOCKQUOTE></BODY></HTML>