add ** to capture unlimited path parts
Matt S Trout [Wed, 4 Nov 2009 18:20:05 +0000 (13:20 -0500)]
lib/Web/Simple/DispatchParser.pm

index 16d9bc5..e2b5166 100644 (file)
@@ -107,6 +107,9 @@ sub _url_path_segment_match {
     # word chars only -> exact path part match
     /\G(\w+)/gc and
       return "\Q$1";
+    # ** -> capture unlimited path parts
+    /\G\*\*/gc and
+      return '(.*?[^/])';
     # * -> capture path part
     /\G\*/gc and
       return '([^/]+)';