lua-users home
lua-l archive

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


On 09/06/2017 12:32 PM, Dirk Laurie wrote:
> 2017-09-06 10:26 GMT+02:00 Daurnimator <quae@daurnimator.com>:
>> At the moment, package.path and package.cpath are strings containing
>> semicolon separated lists.
>> I'd like to propose that they are transitioned to be sequences to
>> allow for easier programmatic manipulation.
> 
> local path = {}
> package.path:gsub("[^;]*,function(x) path[#path+1]=x end
> 
> A breaking change to save having to code that? DMML
> 

String format for <package.path> looks like fossil from early versions.
To get terms (for example, when searching module "by hands") we have to
implement our own parsing functions.

So I am completely agree with proposal.

If this change breaks existing code - new config tables may be named
like "package.path_t" and "package.cpath_t".

--[[
Also there is weird stuff in <package.config>. (String which must
contain five lines with special meaning.) I'd like to change it too.
]]

-- Martin