use base qw( Catalyst::Controller );
#
-# This controller builds two patterns of URI:
+# This controller build the following patterns of URI:
# /captureargs/*/*
# /captureargs/*/*/edit
# /captureargs/*
# /captureargs/*/edit
+# /captureargs/test/*
# It will output the arguments they got passed to @_ after the
# context object.
-# /captureargs/one/edit should not dispatch to
-# /captureargs/*/*
+# /captureargs/one/edit should not dispatch to /captureargs/*/*
+# /captureargs/test/one should not dispatch to /captureargs/*/*
sub base :Chained('/') PathPart('captureargs') CaptureArgs(0) {
my ( $self, $c, $arg ) = @_;
push @{ $c->stash->{ passed_args } }, 'view_one_arg';
}
+sub test_plus_arg :Chained('base') PathPart('test') Args(1) {
+ my ( $self, $c, $arg ) = @_;
+ push @{ $c->stash->{ passed_args } }, 'test_plus_arg', $arg;
+}
+
sub end : Private {
my ( $self, $c ) = @_;