On Thu, Jan 09, 2020 at 07:35:45PM +0100, Tim Düsterhus wrote: > ---- > > Prepends the given string followed by a semicolon to Lua's package.path > variable. > > Lua's package.path is a semicolon delimited list of patterns that > specify how the `require` function attempts to find the source file of a > library. Question marks (?) within a pattern will be replaced by module > name. > > Example: > > By specifying the following path: > > lua-prepend-path /usr/share/haproxy-lua/?.lua > > Lua will attempt to load the /usr/share/haproxy-lua/example.lua script > when `require "example"` is being called. > > See https://www.lua.org/pil/8.1.html for the details within the Lua > documentation. > > ----
OK, it looks pretty good like this, I was not asking for more. I'll take your patch and paste this inside. > > doing. The link is then provided to have the details. And by the way it > > should also be clear what happens if multiple such directives are specified > > (I have no idea). > > It prepends multiple times (instead of overriding the to-be-prepended > value). So I suppose it works like you expect it to work. In fact that > was part of the example given in my initial mail. I prepended two > different "paths" and both variants appear in the error message in > addition to the default ones. OK so the second path will be looked up before the first one. This is something I'll probably add to the doc as well then. Thanks! Willy