[erlang-questions] Shell doesn't seem to recognize code changes.
Wed Jan 7 11:42:34 CET 2009
2009/1/7 Ryan Lepidi <ryeguy1@REDACTED>:
> I am new to Erlang so this is probably some stupid oversight. Basically, I
> have a module that is an implementation of gen_server. I start the server in
> the shell, execute some function, then terminate it. My problem is that if I
> change a function in the module, recompile it, and then execute it in the
> shell again (without closing the shell inbetween the compile), the OLD
> version of the function still remains - the only way to get my new
> functionality is to restart the shell. I make sure to terminate the server
> before starting it up again to test the modified function, and I have
> verified it is indeed stopping with processes().
> Am I doing something wrong?
> erlang-questions mailing list
You have to reload the module with l(module_name) to update module's
code in the VM. Additionally take a look at module "code"
More information about the erlang-questions