From: Chris W. <la...@us...> - 2005-07-04 03:08:02
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17127 Modified Files: Action.pm Log Message: add properties 'url_pattern' and 'url_pattern_group' Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Action.pm 29 Mar 2005 17:01:54 -0000 1.74 --- Action.pm 4 Jul 2005 03:07:53 -0000 1.75 *************** *** 56,59 **** --- 56,61 ---- cache_param => 'Parameters to use when caching contnent', url_additional => 'Parameter names to which additional URL parameters get assigned; may be segmented by task', + url_pattern => 'Regular expression used to determine if an incoming URL is bound to action', + url_pattern_group => 'Regular expression used to get the task + params from the URL after it matches "url_pattern" (optional)', ); *************** *** 2009,2012 **** --- 2011,2036 ---- } + B<url_pattern> ($) + + If you don't want to map an incoming URL to your action with a name + (using L<OpenInteract2::ActionResulver::NameAndTask>) you can do it + with a regular expression. Define the expression in this property and + it will get picked up by L<OpenInteract2::ActionResolver::MatchRegex>. + + Since we don't know exactly what/how you'll be matching the URL or + what the task and additional URL parameters will be, we assume in the + common case that you're going to return it as the first captured + group from the regular expression. + + In the uncommon case you'll define C<url_pattern_group> with your + capturing grou; see below. + + B<url_pattern_group> ($) + + If your C<url_pattern> matches you can define this as a regular + expression; the first capturing group will be used to determine the + task and additional URL parameters. See + L<OpenInteract2::ActionResolver::MatchRegex> for examples. + B<message_name> ($) |