diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/MooseX/Net/API/Meta/Method.pm | 3 | ||||
| -rw-r--r-- | t/lib/TestAPI.pm | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/MooseX/Net/API/Meta/Method.pm b/lib/MooseX/Net/API/Meta/Method.pm index 62b4869..521a802 100644 --- a/lib/MooseX/Net/API/Meta/Method.pm +++ b/lib/MooseX/Net/API/Meta/Method.pm @@ -170,9 +170,10 @@ sub _build_path { $path =~ s/(?:\$|:)$match/$value/; } if ($max_iter > $i) { - $path =~ s/(?:\$|:)(\w+)//; + $path =~ s/(?:\/)?(?:\$|:)(\w+)$//; } } + $path =~ s/(?:\/)?(?:\$|:)(\w+)$//; return $path; } diff --git a/t/lib/TestAPI.pm b/t/lib/TestAPI.pm index 1e8bf97..a2aed55 100644 --- a/t/lib/TestAPI.pm +++ b/t/lib/TestAPI.pm @@ -16,8 +16,8 @@ net_api_method users => ( net_api_method user => ( method => 'GET', - path => '/user/:user_name', - params => [qw/user_name/], + path => '/user/:user_name/:last_name', + params => [qw/user_name last_name/], required => [qw/user_name/], expected => [qw/200/], ); |
