lua-users home
lua-l archive

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


On Thu, Feb 24, 2011 at 17:39, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> The lack of LUA_INIT does bother me a bit. I find myself starting each
>> script with:
>> #!/usr/bin/env lua
>> local init = os.getenv("LUA_INIT"); if init then
>>       if init:sub(1,1) == '@' then dofile(init:sub(2)) else loadstring(init)() end
>> end
>
> I'm sorry, you've lost me here: what lack of LUA_INIT?
>
>

Er...

That's odd, for some reason I thought it didn't look at the LUA_INIT
variable when executing a script, only when calling "lua" on the
command line. Apparently I was wrong. Seems the best way to spot my
mistakes is to complain about them!

-- 
Sent from my toaster.