[erlang-questions] Shell doesn't seem to recognize code changes.

Gleb Peregud gleber.p@REDACTED
Wed Jan 7 11:42:34 CET 2009


2009/1/7 Ryan Lepidi <ryeguy1@REDACTED>:
> Hello,
>
> 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
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>

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"

Best regards,
Gleb Peregud



More information about the erlang-questions mailing list