<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I've been converting a big chunk of my next Catalyst application to Reaction, and have run into an issue with :Chained that seems strange to me, after working with it for a while I've managed to turn it into a tiny little example, hopefully small enough that someone can spot what I'm doing wrong...<DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I've got a basic catalyst application right from the helper (catalyst.pl Test), and the only thing I modified is the root controller:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>package Test::Controller::Root;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>use strict;</DIV><DIV>use warnings;</DIV><DIV>use base 'Catalyst::Controller';</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>__PACKAGE__-&gt;config-&gt;{namespace} = '';</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>sub base : Chained('/') PathPart('') CaptureArgs(0) {</DIV><DIV>    my ( $self, $c ) = @_;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    push( @{ $c-&gt;stash-&gt;{ 'path' } }, 'base' );</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>sub index : Chained('base') PathPart('') Args(0) {</DIV><DIV>    my ( $self, $c ) = @_;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    push( @{ $c-&gt;stash-&gt;{ 'path' } }, 'index' );</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>sub foo : Chained('base') PathPart('foo') Args(0) {</DIV><DIV>    my ( $self, $c ) = @_;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    push( @{ $c-&gt;stash-&gt;{ 'path' } }, 'foo' );</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>sub end : ActionClass('RenderView') {</DIV><DIV>    my ( $self, $c ) = @_;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    $c-&gt;response-&gt;body( join( ' / ', @{ $c-&gt;stash-&gt;{ 'path' } } ) );</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>1;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>When Catalyst starts up, it shows me these chained actions:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[debug] Loaded Chained actions:</DIV><DIV>.-------------------------------------+--------------------------------------.</DIV><DIV>| Path Spec                           | Private                              |</DIV><DIV>+-------------------------------------+--------------------------------------+</DIV><DIV>| /foo                                | /base (0)                            |</DIV><DIV>|                                     | =&gt; /foo                              |</DIV><DIV>|                                     | /base (0)                            |</DIV><DIV>|                                     | =&gt; /index                            |</DIV><DIV>'-------------------------------------+--------------------------------------'</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Which is as it should be, calls to <A href="http://myapp">http://myapp</A>/ should go through "/base(0) =&gt; /index" and calls to <A href="http://myapp/foo">http://myapp/foo</A> should go through "/base(0) =&gt; /foo".</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>When I load up /foo in a browser, I get the expected response:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[info] *** Request 2 (0.333/s) [17853] [Sat Feb 10 08:23:51 2007] ***</DIV><DIV>[debug] "GET" request for "foo" from "127.0.0.1"</DIV><DIV>[debug] Path is "/foo"</DIV><DIV>[info] Request took 0.007484s (133.618/s)</DIV><DIV>.----------------------------------------------------------------+-----------.</DIV><DIV>| Action                                                         | Time      |</DIV><DIV>+----------------------------------------------------------------+-----------+</DIV><DIV>| /base                                                          | 0.000052s |</DIV><DIV>| /foo                                                           | 0.000031s |</DIV><DIV>| /end                                                           | 0.000173s |</DIV><DIV>'----------------------------------------------------------------+-----------'</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>And the output in the browser is "base / foo", just like I wanted.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>However, when I hit the index, it skips right over the base action:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[info] *** Request 3 (0.375/s) [17853] [Sat Feb 10 08:23:53 2007] ***</DIV><DIV>[debug] "GET" request for "/" from "127.0.0.1"</DIV><DIV>[info] Request took 0.005970s (167.504/s)</DIV><DIV>.----------------------------------------------------------------+-----------.</DIV><DIV>| Action                                                         | Time      |</DIV><DIV>+----------------------------------------------------------------+-----------+</DIV><DIV>| /index                                                         | 0.000033s |</DIV><DIV>| /end                                                           | 0.000152s |</DIV><DIV>'----------------------------------------------------------------+-----------'</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>And the output to the browser is just "index".</DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>-- </DIV><DIV>Jason Kohles</DIV><DIV><A href="mailto:email@jasonkohles.com">email@jasonkohles.com</A></DIV><DIV><A href="http://www.jasonkohles.com">http://www.jasonkohles.com</A>/</DIV><DIV>"A witty saying proves nothing."  -- Voltaire</DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR></DIV></BODY></HTML>