[Catalyst] uri_for() doesn't encode to utf8 first argument

Dmitriy S. Sinyavskiy dreel at bk.ru
Fri May 16 22:21:58 BST 2008


Hello, J..
You write 16 мая 2008 г., 4:27:07:

JS> On Thu, May 15, 2008 at 11:50 PM, Dmitriy S. Sinyavskiy <dreel at bk.ru> wrote:
>>  So what about my patch and test?
>>  Is it right or someone can correct it?
>>  The silence is here for a week or more (
>>


JS> Jonathan Rockway asked you to regenerate without whitespace changes.

JS> Just waiting on that from you to properly review it.

JS> -J


It strange I haven't got received letter with this...may be deleted
by antispam (
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;



-- 
 dreel                    mailto:dreel at bk.ru
 Dmitriy S. Sinyavskiy
 Web-developer            Perl, Catalyst, MSSQL
 FGUE EZAN                Telecommunication, data transfer networks and devices.                      




More information about the Catalyst mailing list