lua-users home
lua-l archive

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


Le mar 09/01/2007 à 06:17 askok@dnainternet.net à écrit:
> local ex= require "ex"   -- load to user's own table (not 
> os, io)
> 
> require "ex" (_G)          -- into global namespace
> 
> require "ex" "tie-in"      -- into os.*, io.*
> 
> require "ex" { "os.pipe" }    -- if you want to be really 
> picky


Personally I prefer to always call functions with ().
So for my modules, there is an install method. For example:

local ex = require("ex").install(_G)

If we choose a somution like that, maybe we could provide the two
possibilities.


-- 
Mildred       <xmpp:mildred@jabber.fr> <http://mildred632.free.fr/>
Clef GPG :    <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]