X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FIntro.pod;h=002640263af9383b1748dd911826be1b8616fd99;hb=baf5120b807f1be08f251e0916046ccec0cdc2d4;hp=26491e248a80c8a23448d8c1219f761b61c159d8;hpb=cccc887d602aba1a3e47dcbd07620dafb07a61ad;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index 26491e2..0026402 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -161,6 +161,10 @@ running, using the helper scripts described above. Now visit these locations with your favorite browser or user agent to see Catalyst in action: +(NOTE: Although we create a controller here, we don't actually use it. +Both of these URLs should take you to the welcome page.) + + =over 4 =item http://localhost:3000/ @@ -373,9 +377,9 @@ http://localhost:3000/catalog/foo/widget23 as well. For both LocalRegex and Regex actions, if you use capturing parentheses to extract values within the matching URL, those values are available in -the C<$c-Ereq-Esnippets> array. In the above example, "widget23" +the C<$c-Ereq-Ecaptures> array. In the above example, "widget23" would capture "23" in the above example, and -C<$c-Ereq-Esnippets-E[0]> would be "23". If you want to pass +C<$c-Ereq-Ecaptures-E[0]> would be "23". If you want to pass arguments at the end of your URL, you must use regex action keys. See L below. @@ -419,6 +423,21 @@ C controller must, if called from elsewhere, be reached with C<$c-Eforward('/catalog/order/process/bar')>. +=item * B + +Args is not an action type per se, but an action modifier - it adds a match +restriction to any action it's provided to, requiring only as many path parts +as are specified for the action to be valid - for example in +MyApp::Controller::Foo, + + sub bar :Local + +would match any URL starting /foo/bar/. To restrict this you can do + + sub bar :Local :Args(1) + +to only match /foo/bar/*/ + =back B After seeing these examples, you probably wonder what the point