I'm not sure if this is a bug or if it is by design but:

  sub test1 : PathPart('test') Chained('/') CaptureArgs('1') { }
  sub test2 : PathPart('test2') Chained('test')  { }

yields no path part actions. The weirdest thing is that I actually get
an empty "Loaded Path Part actions" box in the debug output instead of
it not appearing at all.

However, if I use:

  sub test1 : PathPart('test') Chained('/') CaptureArgs('1') { }
  sub test2 : PathPart('test2') Chained('test1')  { }

It understands it correctly and I get:

[debug] Loaded Path Part actions:
.-------------------------------------+--------------------------------------.
| Path Spec                           | Private                              |
+-------------------------------------+--------------------------------------+
| /test/*/test2/...                   | /login/test1 (1)                     |
|                                     | => /login/test2                      |
'-------------------------------------+--------------------------------------'

>From the docs, I thought that I should use the action PathPart name as
the attribute to Chained() - it seemed the method name didn't really
matter (it just happened to be the default PathPart name if you didn't
specify it). However, in practice, that's not how's it working.

Some weird stuff also happens if you specify PathPart actions as such:

  sub another_test  : PathPart Chained('/') {}
  sub another_test2 : PathPart Chained('another_test') {}

It will result in:

[debug] Loaded Path Part actions:
.-------------------------------------+--------------------------------------.
| Path Spec                           | Private                              |
+-------------------------------------+--------------------------------------+
| /another_test/...                   | /login/another_test                  |
| /another_test/another_test2/...     | /login/another_test                  |
|                                     | => /login/another_test2              |
'-------------------------------------+--------------------------------------'

But /another_test/another_test2/ isn't actually callable. But this
latter one is probably an abuse of the chained actions system. ;-)

The first issue, however, still seems to exhibit a somewhat weird
behaviour to me, so I'd welcome at least a little bit of enlightenment
on the matter (ie. if that's really the expected behaviour, what's the
rationale behind it).

Anyway, I'm really enjoying all these new features. Hope you guys keep
up the nice work. ;-)

-Nilson Santos F. Jr.

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to