On 24/09/2014 17:51, Roland Lammel wrote:
> Why not create a helper that does what you need for url_for, by adding a
> trailing slash in case it is missing...
> 
> ### Untested code, just to get the picture
> $self->app->helper(uri_for_trailed => sub { my $url =
> shift->url_for(shift); $url =~ s/[^/]$/\//; return $url; });
> 
> Cheers
> 
> +rl
> 
> +rl

Yes, I tried something like that, and it works. And I did a sort of
uri_abs_for_trailed to since I sometimes need to have the absolute URL.
It would had be nice to have a real solution instead of that kind of
hack, but I think I'll use that.

(when I asked Sebastian for a magic snippet, I thought something like
the snippet in Cookbook#Rewriting, something mojoliciously magic)

Thank you :)
-- 
Luc
http://www.fiat-tux.fr/
Internet n'est pas compliqué, Internet est ce que vous en faites.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to