From: Matt S Trout Date: Wed, 18 Jan 2006 21:10:19 +0000 (+0000) Subject: - Added patch to Intro.pod X-Git-Tag: 5.7099_04~737 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=70d5ae4951da5b2224e73040b05c344b6a2d6c1c - Added patch to Intro.pod --- diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index e8b1c86..a3661e8 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -538,11 +538,10 @@ stage, without processing further actions. =head4 URL Path Handling -You can pass variable arguments as part of the URL path. In this case, -you must use regex action keys with '^' and '$' anchors, and the -arguments must be separated with forward slashes (/) in the URL. For -example, suppose you want to handle C, where C<$bar> and -C<$baz> may vary: +You can pass variable arguments as part of the URL path, separated with +forward slashes (/). If the action is a Regex or LocalRegex, the '$' anchor +must be used. For example, suppose you want to handle C, +where C<$bar> and C<$baz> may vary: sub foo : Regex('^foo$') { my ($self, $context, $bar, $baz) = @_; } @@ -560,6 +559,10 @@ Catalyst matches actions in most specific to least specific order: So Catalyst would never mistakenly dispatch the first two URLs to the '^foo$' action. +If a Regex or LocalRegex action doesn't use the '$' anchor, the action will +still match a URL containing arguments, however the arguments won't be +available via C<@_>. + =head4 Parameter Processing Parameters passed in the URL query string are handled with methods in