sub match {
my ( $self, $c ) = @_;
+ $c->log->debug($self->reverse);
# If infinite args, we always match
return 1 if $self->normalized_arg_number == ~0;
) {
return $self->args_constraints->[0]->check($c->req->args);
} else {
- for my $i($#{ $c->req->args }) {
+ for my $i(0..$#{ $c->req->args }) {
$self->args_constraints->[$i]->check($c->req->args->[$i]) || return 0;
}
return 1;
$c->res->body('many_ints');
}
+ sub int_priority :Path('priority_test') Args(Int) { $_[1]->res->body('int_priority') }
+ sub any_priority :Path('priority_test') Args(1) { $_[1]->res->body('any_priority') }
+
sub default :Default {
my ($self, $c, $int) = @_;
$c->res->body('default');
package MyApp;
use Catalyst;
+ #MyApp->config(show_internal_actions => 1);
MyApp->setup;
}
is $res->content, 'default';
}
+{
+ my $res = request '/priority_test/1';
+ is $res->content, 'int_priority';
+}
+{
+ my $res = request '/priority_test/a';
+ is $res->content, 'any_priority';
+}
+
done_testing;