I would suggest putting the modules in their own LoD addon with the core as a dependency. Then whenever you need to load them, you can use
LoadAddOn() on them. If you really want to continue having them contained in the single addon, then you could either make a toggle function in the module and either make that global so you can call it or put a pointer to it in the addon's private table so the core has access to it.
Here's an example of the second method using the addon's private table. Note, this is only accessible in Lua files, there is no equivalent for XML.
In Chat_Module.lua
Lua Code:
local name,addon=...;
function addon.ChatModuleEnable()
-- Enable your chat module here
end
In Core.lua
Lua Code:
local name,addon=...;
addon.ChatModuleEnable();-- Calls function defined in Chat_Module.lua
This works because a vararg in the main chunk of your Lua files returns the Addon's string ID (the name of the folder your addon is contained in) and an empty local table generated on load that is shared among all of your Lua files.
Note you can put the function call anywhere, but the variables need to be defined in the main chunk as the vararg changes if put in a function.