core.configmanager: Make components use 'component' module by default if none specified

Sun, 22 Mar 2009 15:33:38 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 22 Mar 2009 15:33:38 +0000
changeset 913
3e2dac84017d
parent 912
62dd71870ee3
child 914
50850f15340c

core.configmanager: Make components use 'component' module by default if none specified

core/configmanager.lua file | annotate | diff | comparison | revisions
--- a/core/configmanager.lua	Sun Mar 22 15:23:26 2009 +0000
+++ b/core/configmanager.lua	Sun Mar 22 15:33:38 2009 +0000
@@ -116,12 +116,14 @@
 		env.host = env.Host;
 		
 		function env.Component(name)
+			set(name, "core", "component_module", "component");
+			-- Don't load the global modules by default
+			set(name, "core", "modules_enable", false);
+			rawset(env, "__currenthost", name);
+	
 			return function (module)
 					if type(module) == "string" then
 						set(name, "core", "component_module", module);
-						-- Don't load the global modules by default
-						set(name, "core", "modules_enable", false);
-						rawset(env, "__currenthost", name);
 					end
 				end
 		end

mercurial