#!/usr/bin/perl -- BEGIN{$ENV{PATH_ROUTER_DEBUG}=999;} use Path::Router; use Path::Router::Shell; my $router = Path::Router->new; $router->add_route( '/api/action.:format' ); $router->add_route( '/ro/sham/:bo' ); Path::Router::Shell->new(router => $router )->shell; __END__ /ro/sham/json Attempting to match /api/action.:format against ro/sham/json regexp is (?:api(?:\/action.:format)) ... LENGTH DID NOT MATCH Attempting to match /ro/sham/:bo against ro/sham/json regexp is (?:ro(?:\/sham(?:\/([^\/]+)))) match success $VAR1 = bless( { 'mapping' => { 'bo' => 'json' }, 'route' => bless( { 'validations' => {}, 'components' => [ 'ro', 'sham', ':bo' ], 'defaults' => {}, 'path' => '/ro/sham/:bo' }, 'Path::Router::Route' ), 'path' => 'ro/sham/json' }, 'Path::Router::Route::Match' );