lua-users home
lua-l archive

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


On Apr 7, 2014, at 8:51 PM, Philipp Janda <siffiejoe@gmx.net> wrote:

>    lua < file.lua

'lua - < file.lua’ I guess, but yes, there is no file in that case.

> 
> More importantly, IMHO, this trick also fails if sym- or hard links to the Lua script are involved ...
> And this is probably why a `require_here` will always be a hack: There is no unique file location. There is data and zero or more file paths that refer to that data.

Perhaps. And yet, it’s a useful, practical mechanism when one does indeed deal with regular files. Let not make perfection the enemy of the good.