I'm expecting to receive uri's like
/user/*/account/*
I've got a user function defined as
sub user :Path('/user') :PathPart('') :ActionClass('REST' ) {}
then
sub user_GET :PathPart('user') Chained('/') CaptureArgs(1) {
#do stuff
}
For accounts I'm defining them similarly.
sub account :Path('/account') :PathPart('') :ActionClass('REST') {}
sub account_GET :PathPart('account') Chained('user_GET') Args(1) {
#do stuff
}
So, the problem is when I set Chained in account_GET to 'user_GET' the server debug show that the path is set:
[debug] Loaded Chained actions:
.-----------------------------+--------------------------------------.
| Path Spec | Private |
+-----------------------------+--------------------------------------+
| /user/*/account/* | /mcp/user_GET (1) |
| | => /mcp/account_GET |
'-----------------------------+--------------------------------------'
When I set Chained in account_GET to 'user' the server debug shows:
[debug] Unattached Chained actions:
[debug] Unattached Chained actions:
.-------------------------------------+--------------------------------------.
| Private | Missing parent |
+-------------------------------------+--------------------------------------+
| /mcp/account_GET | /mcp/user |
'-------------------------------------+--------------------------------------'
The problem is that clearly that latter isn't being set up and the former is returning that it wasn't found.
So the problem is if I'm calling /user/12345/account/23456 how do I get that path set correctly when what appears to be the obvious path, Chained('user'), isn't being set and the less obvious path, Chained('user_GET'), simply isn't working?