[erlang-questions] Calling external modules from a fun

Alessandro Sivieri alessandro.sivieri@REDACTED
Wed Apr 28 12:56:38 CEST 2010


2010/4/28 Raimo Niskanen
<raimo+erlang-questions@REDACTED<raimo%2Berlang-questions@REDACTED>
>

>  I'd say it is entirely true, no false case. The module that
> created the fun must also exist on the remote node.
>
> The fun's code is not transfered to the other node
> when the fun is sent to the other node. The module
> that implements the fun has to exist on the other
> node, and in the same version as on the originating
> node. Quite some MD5 and other numbering magic
> is done to ensure that.
>

Ah, thank you for your precise answer, even if it screws up some of my
intentions...
So if I want to send a function which does not exist in the receiving node,
I need to send the source code, because the fun itself is not enough; so, in
a way, I cannot create a closure in the sender, send it to a different node,
and make the latter execute the function (a remote evaluation in the end),
right?

-- 
Sivieri Alessandro
alessandro.sivieri@REDACTED
http://www.chimera-bellerofonte.eu/
http://www.poul.org/


More information about the erlang-questions mailing list