[Bps-public-commit] r16675 - in Path-Dispatcher/trunk: lib/Path/Dispatcher t

sartak at bestpractical.com sartak at bestpractical.com
Tue Nov 4 17:36:43 EST 2008


Author: sartak
Date: Tue Nov  4 17:36:39 2008
New Revision: 16675

Modified:
   Path-Dispatcher/trunk/   (props changed)
   Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm
   Path-Dispatcher/trunk/t/013-tokens.t

Log:
 r74964 at onn:  sartak | 2008-11-03 22:54:57 -0500
 Remove the "if length(leftover) && !prefix" check; it doesn't actually make sense


Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm	Tue Nov  4 17:36:39 2008
@@ -27,10 +27,6 @@
 
     $leftover = '' if !defined($leftover);
 
-    # if we're not matching only a prefix then require the leftover to be empty
-    return if length($leftover)
-           && !$self->prefix;
-
     # make sure that the returned values are PLAIN STRINGS
     # later we will stick them into a regular expression to populate $1 etc
     # which will blow up later!

Modified: Path-Dispatcher/trunk/t/013-tokens.t
==============================================================================
--- Path-Dispatcher/trunk/t/013-tokens.t	(original)
+++ Path-Dispatcher/trunk/t/013-tokens.t	Tue Nov  4 17:36:39 2008
@@ -17,8 +17,6 @@
 $dispatcher->run('foo bar');
 is_deeply([splice @calls], [ ['foo', 'bar', undef] ], "correctly populated number vars from [str, str] token rule");
 
-ok(!$dispatcher->dispatch('foo bar baz')->has_match, "no match for 'foo bar baz' because the rule isn't a prefix");
-
 $dispatcher->add_rule(
     Path::Dispatcher::Rule::Tokens->new(
         tokens => ['foo', qr/bar/],



More information about the Bps-public-commit mailing list