__PACKAGE__->_encode_check(Encode::FB_CROAK | Encode::LEAVE_SRC);
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.90085';
+our $VERSION = '5.90089_001';
$VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases
sub import {
unshift @encoded_args, splice @$captures, $num_captures;
}
- $path = $c->dispatcher->uri_for_action($action, $captures);
+ # use Devel::Dwarn;Dwarn $captures;
+
+ if($action->has_captures_constraints) {
+ unless($action->match_captures($c, $captures)) {
+ carp "@{$captures} do not match the type constraints in $action";
+ }
+ }
+
+ $path = $c->dispatcher->uri_for_action($action, $captures);
if (not defined $path) {
$c->log->debug(qq/Can't find uri_for action '$action' @$captures/)
if $c->debug;
return undef;
}
$path = '/' if $path eq '';
+
+ # At this point @encoded_args is the remaining Args (all captures removed).
+ if($action->has_args_constraints) {
+ unless($action->match_args($c,\@encoded_args)) {
+ carp "@encoded_args do not match the type constraints in $action";
+ }
+ }
}
unshift(@encoded_args, $path);
} @keys);
}
+ warn $base;
+ warn $args;
+
my $res = bless(\"${base}${args}${query}", $class);
$res;
}