switch to + separated for sections
Matt S Trout [Thu, 22 Oct 2009 15:42:05 +0000 (11:42 -0400)]
lib/Web/Simple/DispatchParser.pm
t/dispatch_parser.t

index 71568de..16d9bc5 100644 (file)
@@ -23,7 +23,7 @@ sub parse_dispatch_specification {
       push @match, $self->_parse_spec_section($spec)
         or $self->_blam("Unable to work out what the next section is");
       last PARSE if (pos == length);
-      /\G\s+/gc or $self->_blam('Spec sections not space separated');
+      /\G\+/gc or $self->_blam('Spec sections must be separated by +');
     } until (pos == length) }; # accept trailing whitespace
     return $match[0] if (@match == 1);
     return sub {
index ab6206e..0a8b0cf 100644 (file)
@@ -68,7 +68,7 @@ is_deeply(
   '/post/one/ does not match'
 );
 
-my $combi = $dp->parse_dispatch_specification('GET /post/*');
+my $combi = $dp->parse_dispatch_specification('GET+/post/*');
 
 is_deeply(
   [ $combi->({ PATH_INFO => '/post/one', REQUEST_METHOD => 'GET' }) ],