[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (work4) now available
- From: Jonathan Castello <twisolar@...>
- Date: Fri, 6 Aug 2010 14:25:41 -0700
On Fri, Aug 6, 2010 at 2:22 PM, Petite Abeille <petite.abeille@gmail.com> wrote:
> Which limits one to have a one-to-one representation between module and their physical incarnation. Which is not a step forward as one cannot define multiple modules in one file or a module across multiple files or in dynamically loaded chunks... or any combination of the above. Now instead one will have to mess with package.loaded directly on a case by case scenario, instead of letting module deal with it.
I don't see what prevents you from using require("foo.bar") and
require("foo.baz") for this purpose. And 5.2 will have a new package.*
function that lets you locate the path to a named module, which is
basically require() without actually reading in the file. So you could
easily create multi-file modules using this.
--
~Jonathan