my ($ctx, $action_or_private_path, $captures, @args) = @_;
my $weak_ctx = $ctx; # Just for safety so it can't be closed over.
weaken($weak_ctx);
+ my $params = ref($args[-1]) eq 'HASH' ? pop(@args) : {};
if (ref($captures) eq 'ARRAY' || (!$captures && !scalar(@args))) { # FIXME BUG IN THIS LOGIC
$captures ||= [];
foreach my $name_or_sub ($stash_captures->flatten) {
unshift(@$captures, ref($name_or_sub) eq 'CODE' ? $name_or_sub->($weak_ctx) : $ctx->stash->{$name_or_sub});
}
- $ctx->uri_for_action($action_or_private_path, $captures, @args);
+ $ctx->uri_for_action($action_or_private_path, $captures, @args, $params);
}
};