[erlang-bugs] code:load_abs/1 fails for packaged modules

cyril Romain <>
Thu Jan 8 02:09:22 CET 2009


cyril Romain wrote:
> _FixSuggestions_:
> I think in code_server.erl the load_abs/3 function should be fix so that it:
>   - Successively calls try_load_module with mymodule, to.mymodule, 
> path.to.mymodule, stopping on sucess. Not so elegant though...
>   - Calls try_load_module with mymodule (it actually does). But if the 
> module name in object code does match mymodule, try_load_module with the 
> module name found in object code. So that there is at most 2 calls of 
> try_load_module. Problem: the object code (and the module name) is read 
> by a C function (in beam_load.c) and it seems not straightforward to let 
> Erlang know about the module name read in that object code.
>   - Reading the file once, and use the module name defined within; 
> avoiding multiple call to try_load_module. Better solution, but is it 
> possible ?
>   

Here is a patch following 1st suggestion:
http://www.erlang.org/pipermail/erlang-patches/2009-January/000359.html




More information about the erlang-bugs mailing list