<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px">On Monday, January 11, 2016 7:30 AM, Hartmaier Alexander &lt;alexander.hartmaier@t-systems.at&gt; wrote:<br><br>Hi John,<br><div id="yui_3_16_0_1_1452610504378_3841">the first question that came to my mind was: Why is it called At, both the module as well as the method attribute?</div><div id="yui_3_16_0_1_1452610504378_3842"><br></div><div id="yui_3_16_0_1_1452610504378_3986">-----</div><div id="yui_3_16_0_1_1452610504378_3986">Thanks for taking the time here, its really helpful! &nbsp;Obviously I can always write something that makes total sense to me, but unless other people look at it and discuss I can't make it something that makes sense to others (or decide if its worth doing at all...)</div><div id="yui_3_16_0_1_1452610504378_3986"><br></div><div id="yui_3_16_0_1_1452610504378_3986" dir="ltr">'At' I chose because I wanted the shortest possible thing that I think conveyed &nbsp;enough information to describe what it was doing. &nbsp;I find with my actions when I have subroutine signatures, complex routing and a few action roles I end up with a very very long subroutine preamble. &nbsp;Part of my motivation is to make it shorter but not at the expense of understanding. &nbsp;is "At" too meaningless?&nbsp;</div><div id="yui_3_16_0_1_1452610504378_3986" dir="ltr">-----</div><br>The 'Naming your Arguments' section is confusing because it populates a variable named '$id' but uses '$_{id}' for the response.<br><div>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}.</div><div id="yui_3_16_0_1_1452610504378_4120"><br></div><div id="yui_3_16_0_1_1452610504378_4120">-----&nbsp;</div><div id="yui_3_16_0_1_1452610504378_4120" dir="ltr">I'll try to redo that bit to disambiguate better. &nbsp;Part of me is not 100% convinced $_{NamedArg} is great for Catalyst. &nbsp;So I am still thinking it over.</div><div id="yui_3_16_0_1_1452610504378_4120" dir="ltr">-----</div><div><br></div><div>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}).</div><div><br></div><div>-----</div><div id="yui_3_16_0_1_1452610504378_4168">Since my Catalyst stuff tries to be backcompat to 5.8.x and avoids anything marked experimental, and not widely seen on CPAN, I'd just use the classic form, but I think there's nothing stopping people from using something else right?</div><div id="yui_3_16_0_1_1452610504378_4168">-----</div><br><div id="yui_3_16_0_1_1452610504378_4188">An example how to allow literal {&nbsp; and } in a URL should be added (and the feature if that doesn't exist).</div><div id="yui_3_16_0_1_1452610504378_4210"><br></div><div id="yui_3_16_0_1_1452610504378_4209">-----</div><div id="yui_3_16_0_1_1452610504378_4208">Awesome, will do that, and write a test case for it.</div><div id="yui_3_16_0_1_1452610504378_4207">-----</div><br>The example in 'Matching GET parameters' is incorrect, the full-uri should be'https://fqdn/example/query?name=john;age=47'.<br><div>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.</div><div><br></div><div id="yui_3_16_0_1_1452610504378_4212">-----</div><div id="yui_3_16_0_1_1452610504378_4239">Since query params are not supposed to be ordered, the example works either way. &nbsp;I know some frameworks use hacks to allow ordering, but its explicitly in the RFC that the order is not to be considered meaningful. &nbsp;I'll fix the typo, thanks!</div><div id="yui_3_16_0_1_1452610504378_4239">-----</div><br><div id="yui_3_16_0_1_1452610504378_4261">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?</div><div><br></div><div id="yui_3_16_0_1_1452610504378_4291">-----</div><div id="yui_3_16_0_1_1452610504378_4316">Again this is me looking for something shorter, but I could probably overload it to allow either Via or Chained. &nbsp;I just always found that Chained being used to express root, midpoints and endpoints to be a little too much semantic polymorphism :)</div><div id="yui_3_16_0_1_1452610504378_4411">-----</div><br><div id="yui_3_16_0_1_1452610504378_4392">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 ;)</div><div id="yui_3_16_0_1_1452610504378_4317"><br></div><div id="yui_3_16_0_1_1452610504378_4391">-----</div><div id="yui_3_16_0_1_1452610504378_4346" dir="ltr">The thing is if the classic Chained stuff works for you, I'm glad, and this is probably not aimed at you. &nbsp;I've just heard from literally dozens of people that they don't understand chaining, often ban in in the code, and there's a lot of confusion as to when to using Chaining versus 'classic' attributes. &nbsp;In general I've noted that the attribute based URL mapping caused a ton of trouble for people and just want to experiment with ideas that might make it easier for that group. &nbsp;Thanks!</div><div id="yui_3_16_0_1_1452610504378_4346" dir="ltr">-----</div><br>Cheers, Alex<br><br><br>On 2016-01-08 00:41, John Napiorkowski wrote:<br><br>Lots of people tell me the hardest thing about catalyst is the method attributes used to describe routes, particularly chaining. &nbsp;Here's a sketch for an alternative syntax that encompasses chaining along with more simple routes.<br>&gt;<br>&gt;<br>&gt;jjn1056/Catalyst-ControllerRole-At<br>&gt;<br>&gt;&nbsp; <br>&gt;&nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>&gt;jjn1056/Catalyst-ControllerRole-At<br>&gt;Catalyst-ControllerRole-At - Alternative was to describe Catalyst URL matching paths. <br>&gt;<br>&gt; <br>&gt;View on github.com Preview by Yahoo <br>&gt;<br>&gt; <br>&gt;&nbsp; <br>&gt;<br>&gt;<br>&gt;the SYNOPSIS bit is still WIP so ignore it, but the rest of the docs are proposed final. &nbsp;There's no code for this yet, just docs, I'm looking for feedback on 'is this easier to understand'. &nbsp;<br>&gt;<br>&gt;<br>&gt;Critique welcome, if constructive. &nbsp;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. &nbsp;I'm trying to split the difference between usefully different and alien brains difference. &nbsp;Thanks<br>&gt;<br>&gt;<br>&gt;Jnap<br>&gt;<br>&gt;<br>&gt;_______________________________________________<br>List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ <br><br>-- LG Alex <br><br>*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*<br>T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien<br>Handelsgericht Wien, FN 79340b<br>*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*<br>Notice: This e-mail contains information that is confidential and may be privileged.<br>If you are not the intended recipient, please notify the sender and then<br>delete this e-mail immediately.<br>*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*<br> <br><br>_______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/<br>Dev site: http://dev.catalyst.perl.org/</div></body></html>