Diff

core/modulemanager.lua @ 4182:f71e66702665

modulemanager: Added module.path to the plugin API to let plugins determine their load path.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 20 Feb 2011 20:06:38 +0500
parent 4135:9dfb3c0101b5
child 4337:a2ee8ab82dd9
line wrap: on
line diff
--- a/core/modulemanager.lua	Sun Feb 20 20:03:43 2011 +0500
+++ b/core/modulemanager.lua	Sun Feb 20 20:06:38 2011 +0500
@@ -117,7 +117,7 @@
 	end
 
 	local _log = logger.init(host..":"..module_name);
-	local api_instance = setmetatable({ name = module_name, host = host, config = config,  _log = _log, log = function (self, ...) return _log(...); end }, { __index = api });
+	local api_instance = setmetatable({ name = module_name, host = host, path = err, config = config,  _log = _log, log = function (self, ...) return _log(...); end }, { __index = api });
 
 	local pluginenv = setmetatable({ module = api_instance }, { __index = _G });
 	api_instance.environment = pluginenv;