lua-users home
lua-l archive

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



> require 'ml.table'.export(_ENV)

I do like this one, except maybe export() should put the functions
into either __ENV or the local function environment (we are still in
that awkward transition phase between 5.1 and 5.2 ;))

You can make ml.table callable, so that one can skip the 'export'.

   require 'ml.table'(_ENV)
   require 'ml.table'()  -- put it in the local function environment
   mlt = require 'ml.table'{} -- put it in a forgettable table