__PACKAGE__->_encode_check(Encode::FB_CROAK | Encode::LEAVE_SRC);
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.90117';
+our $VERSION = '5.90120';
$VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases
sub import {
$path .= '/';
}
- my $fragment = ((scalar(@args) && ref($args[-1]) eq 'SCALAR') ? pop @args : undef );
+ my $fragment = ((scalar(@args) && ref($args[-1]) eq 'SCALAR') ? ${pop @args} : undef );
unless(blessed $path) {
if (defined($path) and $path =~ s/#(.+)$//) {
- if(defined($1) and $fragment) {
+ if(defined($1) and defined $fragment) {
carp "Abiguious fragment declaration: You cannot define a fragment in '$path' and as an argument '$fragment'";
}
if(defined($1)) {
if($num_captures) {
unless($expanded_action->match_captures_constraints($c, $captures)) {
- carp "captures [@{$captures}] do not match the type constraints in actionchain ending with '$expanded_action'";
- return;
+ $c->log->debug("captures [@{$captures}] do not match the type constraints in actionchain ending with '$expanded_action'")
+ if $c->debug;
+ return undef;
}
}
# At this point @encoded_args is the remaining Args (all captures removed).
if($expanded_action->has_args_constraints) {
unless($expanded_action->match_args($c,\@args)) {
- carp "args [@args] do not match the type constraints in action '$expanded_action'";
- return;
+ $c->log->debug("args [@args] do not match the type constraints in action '$expanded_action'")
+ if $c->debug;
+ return undef;
}
}
}
if(defined $fragment) {
if(blessed $path) {
- $fragment = encode_utf8(${$fragment});
+ $fragment = encode_utf8($fragment);
$fragment =~ s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go;
$fragment =~ s/ /+/g;
}