Actually, I found the documentation in Catalyst::DispatchType::Chained to be fairly comprehensive.  You might want to give it a once-over.

Steve
On 4/15/2010 8:48 AM, Johannes Kilian wrote:
Thank you - that was the problem ...

It's difficult to find a documented entry to this (Chained/Args/CaptureArgs ...) with (nearly) zero knowledge.

Jo

Am 15.04.2010 14:34, schrieb Steve:
The final 'link' in the chain must have :Args(1) instead of CaptureArgs(1).  This subtlety is what tells the dispatcher that this is the last link in the chain.

Steve



On 4/15/2010 8:24 AM, Johannes Kilian wrote:
Hi there,

I'm pretty at the beginning of understanding how catalyst works - and
have a problem to figure out the chaining mechanism ...

I've got a simple basic catalyst project with only the root controller -
containing the following code:

---
sub base_method : Chained('/') PathPart('test') CaptureArgs(0) {
  my ( $self, $c ) = @_;
  $c->log->debug("Matched testIt::Controller::Root::base_method");
}

sub view : Chained('base_method') PathPart('') CaptureArgs(1) {
  my ( $self, $c, $id) = @_;
  $c->log->debug("Matched testIt::Controller::Root::view - id:<$id>");
}
---
(I just commented out the default-Function in the Root-Controller and
put the above lines in ...)

Starting my server (testIt_server.pl) gives the following output:
---
...
.----------------------------------------------------------+----------.
| Class                                                    | Type     |
+----------------------------------------------------------+----------+
| testIt::Controller::Root                                 | instance |
'----------------------------------------------------------+----------'

[debug] Loaded Private actions:
.----------------------+-------------------------------+--------------.
| Private              | Class                         | Method       |
+----------------------+-------------------------------+--------------+
| /base_method         | testIt::Controller::Root      | base_method  |
| /end                 | testIt::Controller::Root      | end          |
| /view                | testIt::Controller::Root      | view         |
'----------------------+-------------------------------+--------------'

[debug] Loaded Chained actions:
.-------------------------------+--------------------------------------.
| Path Spec                     | Private                              |
+-------------------------------+--------------------------------------+
'-------------------------------+--------------------------------------'
...
---


Why are there no entries in the table "[debug] Loaded Chained actions"?

Running the test-server using address "http://pcjok:3000/test/1" (which
I suppose to work) leads to "Unknown resource "test/1""...

What's wrong?
(Running ActiveState Perl 5.8.8, Catalyst 5.80012 on WinXP SP2 - for
some reasons I'm bound to this environment ...)

Any help welcome!
Thanks in advance ..
Jo

_______________________________________________
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/
  
No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.801 / Virus Database: 271.1.1/2811 - Release Date: 04/14/10 14:31:00
_______________________________________________ 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/


_______________________________________________ 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/

<<attachment: steve.vcf>>

_______________________________________________
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/

Reply via email to