[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion for Lua 5.3.0 -- require search paths
- From: Hisham <h@...>
- Date: Mon, 7 Apr 2014 16:30:28 -0300
On 7 April 2014 07:07, Chris Emerson <chris-lua@mail.nosreme.org> wrote:
> On Mon, Apr 07, 2014 at 11:52:08AM +0200, steve donovan wrote:
>> I haven't had any problems with pl.app.require_here
>>
>> https://github.com/stevedonovan/Penlight/blob/master/lua/pl/app.lua#L26
>>
>> which uses the arg[0] trick. Just needs a single line to be added to
>> the designated "main script"
>>
>> require 'pl.app'.require_here()
>> ...'local requires'
>> ...
>>
>> Works on every platform I've tested on, but I'd appreciate if anyone
>> could find a hole in this scheme....
>
> On the first Linux system I looked at, the installed Lua's package.path doesn't
> include any places a normal user can write to (apart from ., which doesn't help
> here), and there's no Penlight package I can ask the administrator to install.
There's probably a LuaRocks package you can ask the administrator to
install (should be available basically everywhere where there's a
package manager, plus Windows), and then you write `luarocks install
--local penlight` and you'll have a copy of Penlight installed in your
home directory.
Running `eval $(luarocks path)` will fixup your package.path so that
the necessary directories are included. (There's also `eval $(luarocks
path --bin)` if you want to modify your $PATH to include any scripts
installed via LuaRocks.)
-- Hisham
- References:
- Re: Running multiple threads in a lua state, Coroutines
- Re: Running multiple threads in a lua state, Sean Conner
- Re: Running multiple threads in a lua state, Coroutines
- Re: Running multiple threads in a lua state, Sean Conner
- Re: Running multiple threads in a lua state, Rena
- Re: Running multiple threads in a lua state, Coroutines
- Suggestion for Lua 5.3.0 -- require search paths, tonyp
- Re: Suggestion for Lua 5.3.0 -- require search paths, Petite Abeille
- Re: Suggestion for Lua 5.3.0 -- require search paths, Chris Emerson
- Re: Suggestion for Lua 5.3.0 -- require search paths, steve donovan
- Re: Suggestion for Lua 5.3.0 -- require search paths, Chris Emerson