lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2011/10/16 Petite Abeille <petite.abeille@gmail.com>:

> Trivial or not, module complements require and provides valuable functionalities

I came to Lua when 5.2 alpha was already available, and learnt 5.0 and
5.1 in terms of their differences from 5.2.  I never bothered to read
the documentation of the module library in the 5.1 manual.  I write
modules this way:

local mymod1, mymod2
do
  mymod1={}
  -- all variables local
  -- etc
end
do
  mymod2={}
  -- etc
end
return mymod1, mymod2

What's wrong with that?

Dirk