[erlang-questions] old module

12 views
Skip to first unread message

József Bérces

unread,
Oct 8, 2012, 2:56:42 AM10/8/12
to erlang-q...@erlang.org
Is there any way to tell if an old version of the module already exists? The return value of code:delete/1 tells that, but that is too late, I would like to know in advance that the module needs purge.
 
Thanks,
Jozsef

Joe Armstrong

unread,
Oct 8, 2012, 3:09:10 AM10/8/12
to József Bérces, erlang-q...@erlang.org
erlang:check_old_code(Module) -> boolean()

Types:

Module = atom()

Returns true if the Module has old code, and false otherwise.

(How did I find this? -
> cd <src>/lib/kernel/src
> grep purge *.erl

I found it around line 1401 of code_server.erl

(it's also in the erlang manual page :-)

)


/Joe
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Reply all
Reply to author
Forward
0 new messages