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

2008-05-16 Thread Jonathan Rockway
* 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/


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

2008-05-15 Thread J. Shirley
On Thu, May 15, 2008 at 11:50 PM, Dmitriy S. Sinyavskiy [EMAIL PROTECTED] 
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 (



Jonathan Rockway asked you to regenerate without whitespace changes.

Just waiting on that from you to properly review it.

-J

___
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/


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

2008-05-06 Thread Jonathan Rockway
* On Tue, May 06 2008, Dmitriy S. Sinyavskiy wrote:
 The -diff

 Index: Catalyst.pm
 ===

Please regenerate this diff without the whitespace changes.  It is
completely unreadable in the current form.

Examples:

 -  engine_class context_class request_class response_class stats_class 
 +  engine_class context_class request_class response_class stats_class

 -
 +

 -$c-stash-{data} = 
 +$c-stash-{data} =

These spurious changes fuck up the history (when we apply the patch),
and they make it extremely difficult to review your changes.

GNU diff accepts an --ignore-space-change option that should remove
these extra changes.

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/