[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 and 5.1
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Wed, 10 Apr 2013 22:50:25 +0200
On Wed, Apr 10, 2013 at 10:22 PM, Petite Abeille
<petite.abeille@gmail.com> wrote:
>> You can always wrap your files in a function wrapper, and add an
>> appropriate loader/searcher.
>
> Or… you can always set package.loaded and call it a day.
Unless you dont want the modules to be run until required for the
first time, but then package.preload will do the trick.
Anyway, my point was that the lack of module() does not preclude
concatenation. It makes it a bit less convenient.
Here's a script that packages a source tree into a single file. Written
for Lua 5.1, I did not test it with v5.2.
require(), loadfile() and dofile() work as expected.
http://getmoai.com/wiki/index.php?title=Concatenate_your_Lua_source_tree
-- Pierre-Yves
- References:
- 5.2 and 5.1, David Burgess
- Re: 5.2 and 5.1, Matthew Wild
- Re: 5.2 and 5.1, Luiz Henrique de Figueiredo
- Re: 5.2 and 5.1, Miles Bader
- Re: 5.2 and 5.1, David Burgess
- Re: 5.2 and 5.1, Coda Highland
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Joshua Jensen
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Dirk Laurie
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Dirk Laurie
- Re: 5.2 and 5.1, Andrew Starks
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Dirk Laurie
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Dirk Laurie
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Dirk Laurie
- Re: 5.2 and 5.1, Petite Abeille
- Re: 5.2 and 5.1, Pierre-Yves Gérardy
- Re: 5.2 and 5.1, Petite Abeille