<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">Hi all,</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">I want to send a function created dynamically in one node to a second node to be run there.</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr"><br></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">If I do this with erlang shell it works because the created function is compiled with erl_eval: </div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">(abe)1> A = fun() -> io:format(use, "sup", []) end.</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">#Fun<erl_eval.20.12345678> </div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">(abe)2> B=fun test:hey/0.<br></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">#Fun<test.hey.0></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">(abe)3>{shell, bob} ! A.</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">A</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">(abe)4>{shell, bob} ! B.<br></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr">B</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style=""><br class="" style=""></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">(bob)1>register(shell, self()).</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">true</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">(bob)2>receive A -> A() end.</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">supok</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">(bob)3>receive B -> B() end.</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">** exception error: undefined function test:hey/0</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">If I load the module to the second node it will work, but then I have to have all the parameters set. </div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">My preferred solution would be somehow to compile a function turning it into <erl_eval> in a module. Is it possible? will it work?</div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1419501643512_2424" dir="ltr" class="" style="">thank you all</div></div></body></html>