From: Matt S Trout Date: Fri, 2 Jun 2006 22:12:10 +0000 (+0000) Subject: doc'ed :Args X-Git-Tag: 5.7099_04~552 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=baf5120b807f1be08f251e0916046ccec0cdc2d4 doc'ed :Args --- diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index 2ef4371..0026402 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -423,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