|Subject:||Slurpy matching via *:foo and +:bar|
I have a custom extension of Path::Router::Route for one of my applications that adds a couple features. The one relavant to this "bug report" is the ability to create slurpy path matches. This extension allows for the last component in the path spec to be a variable starting with "+" or "*" which work similar to the "?" modifier. The difference being that they will consume all remaining path parts as well and place everything (whether zero parts or one part or 100 parts) into an array reference. This allows for routes defined like this: $self->add_route('page/:action/:repository/*:page' => ... ); $self->add_route('attachment/:action/:repository/+:file' => ... ); which allows me to give the files in the wiki a natural tree structure within the git repository, making any git repository a potential wiki database. You can see the code in the extension here:and in use here: If you are interested, I can fold that into Path::Router and send you a patch. Cheers.