[erlang-questions] Loading code generated on the fly

Robert Virding rvirding@REDACTED
Sat Sep 27 20:45:57 CEST 2008


I am generating compiled erlang code on the fly without saving using files
(using LFE) and need to load the compiled binary into the system. Now, I
know how to do myself "by hand" but I would prefer to go through the normal
code loader to keep it all clean.

There is a call code:load_binary(Module, FileName, Binary) which seems to do
what I want, BUT there is this argument FileName. Now I don't intend to save
the module in a file unless I really have to as it seems like a bit of
unnecessary work to save it in a file just so I can load it. What is the
significance of the FileName argument and does it matter what I set it to?
Can I just call Module.beam and be done with?

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080927/083275a1/attachment.htm>


More information about the erlang-questions mailing list