4 function register(path, t)
\r
5 local curr = actions;
\r
6 for comp in path:gmatch("([^/]+)/") do
\r
7 if curr[comp] == nil then
\r
11 if type(curr) ~= "table" then
\r
12 return nil, "path-taken";
\r
15 curr[path:match("/([^/]+)$")] = t;
\r
19 return { actions = actions, register= register };