lua-users home
lua-l archive

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


> Notice that the exclamation mark in the path gets replaced (as
> documented). You can dismiss it as the case of "when I do this it
> hurts; don't do it", but it's not a hypothetical case; I got this
> error message from one of my users.
> 
> I'd like to know if there is a way to avoid this behavior (or a
> workaround) other than recompiling lua with this turned off.
> Ideally I think this needs to be fixed with '!' only replaced if it's
> at the beginning of the path.

This substitution only happens the first time Lua sets the path
(either from LUA_PATH or from the default from luaconf). If you
set the path by other means, you can avoid the problem. You may
try something like this:

  bin\lua -e "package.path='/Lua/!me/zbs/lualibs/?/?.lua'" -e "require'foo'"


(To fix this problem, maybe we should use some kind of escape. Your
particular user needed an '!' in the path, but other users may need
a '?' or even a ';'; all are valid characters in path names.)

-- Roberto