[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Loading all modules in package.path automatically
- From: Patrick Donnelly <batrick@...>
- Date: Mon, 8 Feb 2010 16:28:54 -0500
On Mon, Feb 8, 2010 at 3:25 PM, Joe Andresen <email@example.com> wrote:
> is it possible to require all give modules in a path without knowing their
> Will this work with subdirectories of that path as well? or does that have
> to be included in package.path?
Lua simply appends the module name to each path and then tries to open
the file. It has no concept of a directory so it cannot iterate over
the files in a directory for modules to load.
On the other hand, you can construct LUA_INIT so that it requires all
modules in a directory with some fancy bash code (an exercise left to
- Patrick Donnelly