lua-users home
lua-l archive

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


On Wed, Mar 26, 2014 at 11:52 AM, Enrico Colombini <erix@erix.it> wrote:
> On 26/03/2014 17.32, Sean Conner wrote:
>>>
>>> What happens if the script is launched with a different version of Lua
>>> from the one in the path, e.g. it is launched with "test/lua53
>>> script.lua" when "/usr/bin/env lua" launches "lua52"?
>
>>
>>
>>  The top line is ignored.
>
>
> Ah, yes. So any test put inside the !# line would not be enough to detect
> the wrong intepreter version before the parser chokes on unrecognized
> operators.
>
> --
>   Enrico
>


And, regardless, the man put "elegant" in the title. Presumably that
means simple, like the provided examples in the request.

I have no opinion on whether or not it *should* be done. I'm just
assuming that laziness or want for a workable alternative was not
primary.

-Andrew