[Catalyst-commits] r12834 - Catalyst-Runtime/5.80/branches/uri_for_utf8/lib

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Feb 8 21:20:05 GMT 2010


Author: t0m
Date: 2010-02-08 21:20:05 +0000 (Mon, 08 Feb 2010)
New Revision: 12834

Modified:
   Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm
Log:
Unfuck

Modified: Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm	2010-02-08 20:58:18 UTC (rev 12833)
+++ Catalyst-Runtime/5.80/branches/uri_for_utf8/lib/Catalyst.pm	2010-02-08 21:20:05 UTC (rev 12834)
@@ -1265,6 +1265,9 @@
       ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
 
     carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
+    foreach my $arg (@args) {
+        utf8::encode($arg) if utf8::is_utf8($arg);
+    }
     s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
     if (blessed $path) { # Action object only.
         s|/|%2F|g for @args;
@@ -1293,17 +1296,6 @@
 
     undef($path) if (defined $path && $path eq '');
 
-    my $params =
-      ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
-
-    carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
-
-    foreach my $arg (@args) {
-        utf8::encode($arg) if utf8::is_utf8($arg);
-    }
-    s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args;
-    s|/|%2F| for @args;
-
     unshift(@args, $path);
 
     unless (defined $path && $path =~ s!^/!!) { # in-place strip




More information about the Catalyst-commits mailing list