[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: "module" tutorial
- From: Lavergne Thomas <thomas.lavergne@...>
- Date: Fri, 14 Apr 2006 01:29:31 +0200
--- foo.lua ---
module('foo', package.seeall)
function bip()
print('bip')
end
---------------
--- bar.lua ---
require('foo')
foo.bip()
---------------
The most minimalist tutorial I can write ;-)
Hope this help you
Tom
On Thu, Apr 13, 2006 at 11:14:32AM +0100, Stockdale, Daire, SOE wrote:
> Hello
>
> Can anyone provide a minimalist tutorial on correct use of the "require"
> and "module" functions of 5.1 please, especially with reference to
> creating a native Lua module? Or direct me to one?
>
> Lots of thanks,
>
> daire
>
>
>
> ========================================
> DISCLAIMER
>
> The contents of this e-mail and any attachments are confidential to the intended recipient and may also be legally privileged. Unless you are the named addressee (or authorised to receive for the addressee) of this email you may not copy, disclose or distribute it to anyone else.
>
> If you have received this email in error, please notify us immediately by e-mail on administrator@sega.co.uk and then delete the email and any copies. The SEGA Group have made all reasonable efforts to ensure that this e-mail and any attached documents or software are free from software viruses, but it is the recipient's responsibility to confirm this.
>
> ========================================
>
--
Thomas Lavergne "Le vrai rêveur est celui qui rêve
de l'impossible." (Elsa Triolet)
thomas.lavergne@reveurs.org http://reveurs.org