On Tue, Jul 12, 2011 at 5:24 AM, steve donovan
<[email protected]> wrote:
> On Tue, Jul 12, 2011 at 6:54 AM,  <[email protected]> wrote:
>> The Perl approach uses a separate Config module, see:
>>   perldoc Config
>
> Yes, it would be cool if a specific configuration could itself be
> installed as a rock, that is if the module luarocks.userconfig can be
> loaded with require(), then it will contain (additional?)
> configuration in the same format as before.

Well, one could do this now by setting LUAROCKS_SYSCONFIG in
luarocks.config to a path to a rock module, say,
"/usr/share/lua/5.1/userconfig.lua" and then create a "userconfig"
rock that installs this file. I'm not sure how useful that would be,
though.

> Using dlopen would be more general, so I experimented with
> package.loadlib. Generally you need a particular known entry point,
> but by parsing the error it should be possible to judge:

I'd rather not parse error messages. There's the issue of
internationalization, and error messages are not a well-defined
protocol (they can and do change unexpectedly).

> But finding shared libraries is a relatively easy problem, compared to
> finding the include files. They do move around a lot (e.g. tcl/tk) !
> That's why I thought that it would be useful if a rock author could
> specify a list of possible locations, rather than relying only on a
> fixed set of patterns. Then the burden passes to the maintainer, who
> should do 'due diligence' and try out the module on different systems.

Yes, but that's a related but different problem. Providing a list of
alternative paths/names for includes and libraries is on the wishlist.

> I sympathize with Hisham on this one: it's hard to do good software
> when you're chasing a dozen operating systems ;)

Yes, it's hard, but the solution is to provide defaults that work on
most places, and make things as configurable as we can, so that users
who care enough can configure the software so that it runs on their
systems. For those who can't be bothered, the distribution maintainers
go through this work for them.

-- 
-- Hisham
http://hisham.hm/ - http://colorbleed.com.br/

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to