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.
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:
> = package.loadlib('user32.dll','aardvark')
nil The specified procedure could not be found.
> = package.loadlib('user33.dll','DllOpen')
nil The specified module could not be found.
> = package.loadlib('libssl3.so','aardvark')
nil /usr/lib/libssl3.so: undefined symbol: aardvark
> = package.loadlib('libssl3.so','aardvark')
nil libssl4.so: cannot open shared object file ....
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.
I sympathize with Hisham on this one: it's hard to do good software
when you're chasing a dozen operating systems ;)
steve d.
------------------------------------------------------------------------------
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