[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: just got curl working :-)
- From: Michal Kolodziejczyk <miko@...>
- Date: Fri, 22 Oct 2010 11:01:58 +0200
On 21.10.2010 11:59, steve donovan wrote:
> On Thu, Oct 21, 2010 at 12:41 PM, <pj@pjb.com.au> wrote:
>> It's unfortunate to have namespace conflicts in such basic stuff as
>> posix and curl. It reminds me of JavaScript; it means my app should
>> test for curl.new == None and use different code accordingly...
>
> Oh yes, especially posix - that's really basic functionality. E.g.
> because both posixes are in the LuaRocks repository, I cannot make
> 'lposix' a dependency on a LR module/script without potentially
> messing up some script that uses 'luaposix'.
>
> Now in LR previous to 2.0.x, this was resolvable using
> luarocks.require - but people found using that all the time to be a
> pain and 'not normal' (I know, I was one of them - now I see the
> point)
I think it would be resolvable in the future with current LR with change
in module naming:
local posix=require 'org.example.luaposix'
or
local posix=require 'org.example2.lposix'
and then "require 'posix'" should be discouraged in any software (unless
global "posix" space was defined with well-known API, and could wrap any
existing implementation).
See also:
http://lists.luaforge.net/pipermail/luarocks-developers/2009-September/001204.html
Regards,
miko