|
That'd be the simplest (read: best) way. Another way, if
you wanted to guarantee it would read everything in the path (say, for future
expansion), would be to include LuaFileSystem in your project.
From: Joe Andresen
Sent: Monday, February 08, 2010 P1:41
Newsgroups: gmane.comp.lang.lua.general
To: Lua list
Subject: Re: Loading all modules in package.path
automatically I'm hoping to use this for my game engine editor, which uses lua interface. I think what i'll end up doing is to construct a data structure that matches the hierarchy of modules in the directory path, and then when the user wants to use a particular module in the GUI it just adds the strings together and calls require, that way im not over including things. On Mon, Feb 8, 2010 at 1:28 PM, Patrick Donnelly <batrick@batbytes.com>
wrote:
|