[Catalyst-dev] Catalyst::Manual Questions For The Group

Kiffin Gish kiffin.gish at planet.nl
Sun Nov 15 17:02:01 GMT 2009


On Sun, 2009-11-15 at 09:48 -0500, hkclark at gmail.com wrote:
> I took a look at some of these but I wasn't sure if I should start
> changing things or not.  It seems that every time I don't cover
> variation people might run into if they aren't on the
> latest/recommended versions, then they get "stuck" and frustrated.  I
> agree that the "Note that if you are using version XX of XX you ..."
> stuff can be distracting, but it seems like a necessary evil (unless
> the issue is *really* old... I do try to eventually prune those out).
> Thoughts?

My preference would be to stick to the most recent version and remove
any references to older versions. You can make this very clear at the
beginning of the tutorial. Like you say, it's messy and distracting to
mix versions together in the manual.

If indeed there is a need for older versions, then you could include
some appendix listing the differences on what pages, but this could be
alot of extra work I realize. 

> User asks "what If I want to accept with 0, 1 or 2 but not anymore
> arguments than that?"... my understanding is that you can specify an
> exact number of :Args or omit it for any number, but not do a range of
> acceptable args.  Can anyone confirm if this is correct?

According to the Catalyst::DispatchType::Chained documentation:

By default, endpoints receive the rest of the arguments in the path. You
can tell Catalyst through :Args explicitly how many arguments your
endpoint expects, just like you can with :CaptureArgs. Note that this
also affects whether this chain is invoked on a request. A chain with an
endpoint specifying one argument will only match if exactly one argument
exists in the path.

You can specify an exact number of arguments like :Args(3), including 0.
If you just say :Args without any arguments, it is the same as leaving
it out altogether: The chain is matched regardless of the number of path
parts after the endpoint.



-- 
Kiffin Gish <Kiffin.Gish at planet.nl>
Gouda, The Netherlands





More information about the Catalyst-dev mailing list