[erlang-questions] code_server patch

Serge Aleynikov saleyn@REDACTED
Wed Oct 17 14:42:31 CEST 2007


Sorry I realized that in my previous email I included a wrong version of 
the patch.  This one is for R11B-5 and does the proper ordering of 
directory inclusions.

Serge

Serge Aleynikov wrote:
> Hi,
> 
> In the current installation of Erlang I ran into a need to separate the 
> distribution installation and various 3rd party libraries, so that at 
> startup Erlang's code server still was able to auto-locate all libraries 
> under a given set of paths.  Unfortunately by default it only examines 
> the content of $ROOT/lib path, and the rest needs to be provided via 
> "-pa" or "-pz" command-line options.
> 
> I came up with this little patch to the code_server that enables to 
> specify the environment variable ERL_LIBS that can contain a delimited 
> list of paths that would be searched for "*/ebin" sub-dirs and if found, 
> included in the library path.  As a result you can install Erlang in one 
> location and conveniently maintain your libraries in another location:
> 
> Example usage:
> 
> $ export ERL_LIBS=~/opt/erlang/lib:/opt/erlang/lib
> $ erl
> 1> lists:reverse(code:get_path()).
> 
> I verified that this patch works for both erl and erlc.
> 
> Are there any drawbacks in including this patch to the distribution?
> 
> Serge

-------------- next part --------------
A non-text attachment was scrubbed...
Name: code_server.R11B-5.patch
Type: application/octet-stream
Size: 1705 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071017/9c408a1a/attachment.obj>


More information about the erlang-questions mailing list