Seems equivalent to me. Load the definition of the function from a file only when it’s called?
P.
From:
lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On
Behalf Of George Jempty
Sent: 27 June 2006 13:29
To:
Subject: Re: equivalent of Perl's
"AUTOLOAD"
Thanks to everyone for the responses! I did recall the book discussing "autoload" but I don't think it means the same thing in Lua as in Perl, but please correct me if I'm wrong.
On 6/27/06, Paul Hudson <phudson@pobox.com> wrote:
And autoload is in the
PiL book
http://www.lua.org/pil/15.5.html
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br]
On Behalf Of Luiz Henrique de
Figueiredo
Sent: 27 June 2006 12:45
To:
Subject: Re: equivalent of Perl's "AUTOLOAD"
> Yes, you'ld want to look into the __newindex meta method.
No, it's the __index metamethod.