[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Proposal: package.(c)path as tables
- From: Sean Conner <sean@...>
- Date: Thu, 7 Sep 2017 04:58:35 -0400
It was thus said that the Great Martin once stated:
> Ideally, to add path "../strange;name/*.lua" I'd wish to call
>
> package.add_search_path('../strange;name/*.lua')
>
> and do not know about special characters from "package.config"
> for name substitution and records delimiting.
>
> Current proposal (store "package.path" as sequence of strings)
> releases user from knowing about paths delimiter character.
> So it simplifies code, making it more understandable for "common
> programmer".
But ... if you want to add "../strange;name/*.lua" to the path, you are
already dealing with path delimeter characters and substitution characters
(I assume that "*" means the same as "?", which is the character Lua uses
for module name substitution). If anything, it might be nice to have:
package.config =
{
directory = "/",
separator = ";",
substitution = "?",
exec_directory = "!",
ignore = "-"
}
instead of what we have now. But I digress ...
-spc