��������������돪��������¡�Chained\��\���\·\���\��я����ҏ���������»������������������������������¹��¡����������������������������������������������������̏����������я��������¹��������
������������ http://localhost:3000/hoge/*/*/edit �����Ώ����ď����������������»��������URL���������Ð���¹������\��\���\·\���\��я����ҏ�돫����������ď��������������­��������������¡񏪤���³��������ӏ��������¹���쏢돪������������������auto���������«begin������Chained�����������������Џ��¹�����������������Ï�������¡�¡�¡�(*���­��\����*)

\µ\���\��\������������³�����я�����������������¡�

sub mysetup : Chained('/') PathPart('') CaptureArgs(2) {
    my ($self, $c, @arg) = @_;
    $c->log->debug("in mysetup");
    $c->log->debug( $arg[0] );
    $c->log->debug( $arg[1] );
}                     

sub myaction : Chained('mysetup') PathPart('do_action') Args(1) {
    my ($self, $c, $arg) = @_;
    $c->log->debug("in myaction");
    $c->log->debug( $arg );
    $c->res->body(1);
}

Catalyst������\���\¹\���\µ���¼\Ð������µ�������돢�¹��������������¡��³������Chained\��\���\·\���\��я�������­���������������Ï��������½¼�����µ���������������¹��¡���do_action��������돢����2�������돫⏢ď�ԏ��̏�������������¡��½������������do_action���̏�������������¡�돪�������������������1�������돫⏢ď�ԏ��̏��������������㏢����������������URL�������������­��������¡��³������Chained\��\���\·\���\��я��̏��������Ð��������������¡����������������á돪؏�����������¹��¡����������������Ώ������ޏ�Ï����Ï����� (2) �����������������Ï��������� mysetup\���\½\���\��������� CaptureArgs(2) ������ (2) ���������¹��¡�

.---------------------------+----------------------------.
| Path Spec                 | Private                    |
+---------------------------+----------------------------+
| /*/*/do_action/*          | /mysetup (2)               |
|                           | => /myaction               |
+---------------------------+----------------------------+

������𡯏��Ð��¡� http://localhost:3000/hoge/fuga/do_action/foo ������\��\���\»\¹���¹���������������³������Chianed\��\���\·\���\��я��̏��������Ð��������¡��³���������������Ï�����·���²������̏��������������������������¹��¡�

[debug] in mysetup
[debug] hoge
[debug] fuga
[debug] in myaction
[debug] foo

���µ��������¡��³�������������²���������·������»������������������¹������Chianed\��\���\·\���\��я��������¹���̏�¡�\��\���\���\���\������¼\�������:�����¡ޏ�Ï����Ï������̏��������������������«������������������������·����ޏ�я��·��������������������ď�������������ď������������������������������������«������»�ߏ����Ï�����������¡񡭏������ޏ����������������������������������Ώ��������¹��¡�

¼���������Chained\��\���\·\���\��я������������돪�²¼������3���������·���«\������¼\������̏����������������»�����я�¡�

\������¼\������½�����¡�� ���� Chained\��\���\���\���\������¼\���

��돪�½���������\��\���\·\���\��я���������������̏����� Chained('/') �����ҏ����؏��ޏ��������¹��¡�
�񡯏��½�����Ï��·������������������Chained\��\���\·\���\��я�����»���������������������Catalyst���̏����¼�ޏ��������­���������»������
2�����ӏ�����돪�¹��Ώ�����\��\���\·\���\��я�������������¡�����������\��\���\·\���\��я����������돢ď��µ���»���������«���폢����»������������·���������¹��¡��³���������������ޏ�¡�

# ���³���³���������¾������\��\���\»\¹���������­������������(Private\��\���\·\���\���)
sub hoge : Chained('/') ... {}

# ���³���³���������¾������\��\���\»\¹���������­������������(Private\��\���\·\���\���)
sub fuga : Chained('hoge') ... {}

# ���³���³������\��\���\»\¹���¹��������������¡�hoge -> fuga -> foo ������¼«����돪���쏢�������������Ð������������
sub foo : Chained('fuga') ... Args(0) {}

\������¼\������½�����¡�² ���� PathPart\��\���\���\���\������¼\���

PathPart���������������½������\���\½\���\������̏�¡�¼�����돪�����URL����������������������������»��⏪�я�����\���\���\������¹���������«���폢����»������������·���������¹��¡�

PathPart('')     # ²��ď�����������\���\���\������·����������������URL�������ޏ����������·����������������
PathPart('hoge') # hoge������\���\���\���
PathPart         # \���\½\���\������¾���½��������������������\���\���\���

\������¼\������½�����¡�³ ���� CaptureArgs\��\���\���\���\������¼\��� or Args\��\���\���\���\������¼\���

³���\���\½\���\������̏����������������������¡돫⏢ď�ԏ�����¼��؏���¼������������«������»������������·���������¹��¡�

CaptureArgs(0) # �돫⏢ď�ԏ�����¼��؏���¼���������������������
CaptureArgs(1) # �돫⏢ď�ԏ�����1������¼��؏���¼���������

�����ď��������·��¡�돪�������������\��\���\·\���\��я����������� CaptureArgs ������������������������ Args ������»������������·���������¹��¡�
�񡯏��½�����Ï��·������������������Chained\��\���\·\���\��я�����½��쏢����������������Catalyst���̏����¼�ޏ��������­���������»������
Args������¾���¹����������������������������������돫⏢ď�ԏ�����ď�ԏ�����»������������·���������������³������������²������½���������¹��¡�

Args(0) # �돫⏢ď�ԏ�����¼��؏���¼���������������������
Args(1) # �돫⏢ď�ԏ�����1������¼��؏���¼���������
Args    # �돫⏢ď�ԏ����ҏ��������������������«¼��؏���¼�������������¼��؏���¼������������������������«���������·����������������������

���³������������3������������\��\���\���\���\������¼\��������ҏ���̏����⏢����»������������·�����������²���������������ޏ��������¹�����񡯏���̏�����»������������¹���������³������������¡򡭏������ޏ��������¹��������������¡돢¡�
�����Ώ��������µ�����я���������������я�¡�Chained\��\���\·\���\��я�����»��������������������Ώ��������������������µ���������쏪���������̏��������¹�����������������á�����Ï���
³\\\\¼ҏ\\\\¼\²