Changeset 10526

Show
Ignore:
Timestamp:
04/27/08 13:23:05 (5 years ago)
Author:
tokuhirom
Message:

empty string is false value... perl--

Location:
lang/perl/HTTPx-Dispatcher/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTPx-Dispatcher/trunk/lib/HTTPx/Dispatcher/Rule.pm

    r10454 r10526  
    127127    my %args = %$args; 
    128128    while (my ($key, $val) = each %args) { 
    129          $uri = $self->_uri_for_match($uri, $key, $val) or return; 
     129         $uri = $self->_uri_for_match($uri, $key, $val); 
     130         return unless defined $uri; 
    130131    } 
    131132    return "/$uri"; 
  • lang/perl/HTTPx-Dispatcher/trunk/t/02_uri_for.t

    r10433 r10526  
    6060--- expected:   /content/3 
    6161 
     62=== 
     63--- dispatcher 
     64connect '' => { controller => 'Root', action => 'index'  }; 
     65--- uri_for:  { controller => 'Root', action => 'index' } 
     66--- expected:   / 
     67