Hi John,
the first question that came to my mind was: Why is it called At, both the
module as well as the method attribute?
The 'Naming your Arguments' section is confusing because it populates a
variable named '$id' but uses '$_{id}' for the response.
I understand that you want to show that the args get passed to the sub like in
core Catalyst but I'd do that in a second example as the preferred way to do it
with this module would be $_{id}.
I'd prefer to use the (experimental) subrouting signature feature of Perl 5.20
than $_{id} which also doesn't have the same API as Perl 5.10 named regex
capture patterns ($+{id}).
An example how to allow literal { and } in a URL should be added (and the
feature if that doesn't exist).
The example in 'Matching GET parameters' is incorrect, the full-uri should
be'https://fqdn/example/query?name=john;age=47'.
Would it also match any order of the parameters like
'https://fqdn/example/query?age=47;name=john'? I didn't find this in the
Catalyst::ActionRole::QueryParameter docs.
That might be a stupid question because I don't know the internal workings but
could it be called 'Chained' instead of 'Via' so if someone want's to convert
the route matching to this module (s)he doesn't have to rewrite as much?
I think I like the parameter type matching and extraction more than the
different syntax but I'm no good measure because I've grown up with Chained ;)
Cheers, Alex
On 2016-01-08 00:41, John Napiorkowski wrote:
Lots of people tell me the hardest thing about catalyst is the method
attributes used to describe routes, particularly chaining. Here's a sketch for
an alternative syntax that encompasses chaining along with more simple routes.
jjn1056/Catalyst-ControllerRole-At<https://github.com/jjn1056/Catalyst-ControllerRole-At>
[image]<https://github.com/jjn1056/Catalyst-ControllerRole-At>
jjn1056/Catalyst-ControllerRole-At<https://github.com/jjn1056/Catalyst-ControllerRole-At>
Catalyst-ControllerRole-At - Alternative was to describe Catalyst URL matching
paths.
View on github.com<https://github.com/jjn1056/Catalyst-ControllerRole-At>
Preview by Yahoo
the SYNOPSIS bit is still WIP so ignore it, but the rest of the docs are
proposed final. There's no code for this yet, just docs, I'm looking for
feedback on 'is this easier to understand'.
Critique welcome, if constructive. I know lots of people don't like the method
attribute stuff, but I'm not doing any work on that right now, so constructive
critique means not saying you'd prefer something other than method attributes
:) I already hear that, but this is something that can layer as sugar on top of
the existing work, or even mixed into an existing project. I'm trying to split
the difference between usefully different and alien brains difference. Thanks
Jnap
_______________________________________________
List: [email protected]<mailto:[email protected]>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
-- LG Alex
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/