* On Sat, May 17 2008, Dmitriy S. Sinyavskiy wrote:
> It strange I haven't got received letter with this...may be deleted
> by antispam (

Yes, your mailserver rejected my reply.  However, the list did receive
it.

> Nevertheless I've done it now:
>
> Index: Catalyst.pm
> ===================================================================
> --- Catalyst.pm       (revision 7759)
> +++ Catalyst.pm       (working copy)
> @@ -948,10 +948,12 @@
>      my $params =
>        ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
>  
> +    $path =~ s!/+!/!g; # strip extra slashes '///'
> +    unshift(@args, split('/', $path));
>      carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
>      s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
>  
> -    unshift(@args, $path);
> +    
>  
>      unless (defined $path && $path =~ s!^/!!) { # in-place strip
>          my $namespace = $c->namespace;

OK, but it looks like you forgot the tests. :) However, I think the
patch is sound.  Please check that things like:

  uri_for('/controller/ほげ')
  *click that link*
  
dispatch correctly, though.

Regards,
Jonathan Rockway

-- 
print just => another => perl => hacker => if $,=$"

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to