Change in the on_load mechanism

Björn Gustavsson bgustavsson@REDACTED
Thu Dec 10 15:18:36 CET 2009


I have now changed the expected return value for an on_load
function as described here:

http://github.com/erlang/otp/commit/7390bb7c178f3bed10283ef15065cea3bdc11090

Compared to my suggestion in another discussion thread, there is a slight
change. There will be a message sent to the error_logger if anything
else than an atom is returned. That way, exceptions will always cause
an error_logger message. By explicitly returning an atom (other than 'ok'),
you can silently prevent the module from loading.

You can try out the new on_load mechanism by building from the 'pu'
branch (which will also include Sverker's update of the NIFs).

If you have any comments or suggestions regarding this change,
please send them as soon as possible.

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list