<div dir="ltr">In your case the pointer to function is stored internally and it goes extinct when module is gone.<br>If you make it calculate function at runtime by, say, calling apply(mprocess, process_template, [test]), then it should work.<br></div><br><div class="gmail_quote"><div dir="ltr">sön 11 sep. 2016 kl 08:57 skrev Nuku Ameyibor <<a href="mailto:nayibor@gmail.com">nayibor@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Dear List ,<br><br></div>i run into an issue where i was storing an anonymous function in mnesia to be executed later .<br><b>F=fun(test) ->mprocess:process_template(test)end.</b><br><br></div><div><br></div>however as soon as i make some changes to the mprocess module and upgrade the module i get a <b>** exception error: bad function</b> error when i retrieve the fun and try to execute which i assume is because of the difference in the module versions . <br></div>Is there a way of making the stored fun execute the code and not have version conflicts .<br></div><br></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>