+ function env.Component(name)
+ set(name, "core", "component_module", "component");
+ -- Don't load the global modules by default
+ set(name, "core", "load_global_modules", false);
+ rawset(env, "__currenthost", name);
+
+ return function (module)
+ if type(module) == "string" then
+ set(name, "core", "component_module", module);
+ end
+ end
+ end
+ env.component = env.Component;
+
+ function env.Include(file)
+ local f, err = io.open(file);
+ if f then
+ local data = f:read("*a");
+ local ok, err = parsers.lua.load(data);
+ if not ok then error(err:gsub("%[string.-%]", file), 0); end
+ end
+ if not f then error("Error loading included "..file..": "..err, 0); end
+ return f, err;
+ end
+ env.include = env.Include;
+