2 -- Copyright (C) 2008-2009 Matthew Wild
3 -- Copyright (C) 2008-2009 Waqas Hussain
5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information.
12 function register(path, t)
\r
13 local curr = actions;
\r
14 for comp in path:gmatch("([^/]+)/") do
\r
15 if curr[comp] == nil then
\r
19 if type(curr) ~= "table" then
\r
20 return nil, "path-taken";
\r
23 curr[path:match("/([^/]+)$")] = t;
\r
27 return { actions = actions, register= register };