[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Module system curiosity
- From: Florian Weimer <fw@...>
- Date: Sun, 30 May 2010 20:31:22 +0200
* Mark Hamburg:
> The simple fix is to change the module function so that it doesn't
> set any globals but rather just populates a registry of loaded
> modules. That way, in your example, all that require "lpeg" would do
> is:
What would you suggest for nested modules? Return the top-most module
along the path? But that might contain other non-imported modules.
> If you want to re-export lpeg from within your module, you are free
> to do so, but it doesn't seem like something you would ordinarily
> want to do.
Yes, that part is fine.
> This does make require a bit more cumbersome in interactive mode,
> however.
There could be a shortcut similar to the "= expression".