App supporting several Erlang releases

Vlad Dumitrescu <>
Mon Jan 17 13:43:35 CET 2011


Hi!

This may be a dumb question, as I seem to have gotten caught in a "empty
mind" state... Alternatively, the answer will come to me 5 seconds after
pressing "send"...

I have some code that I'd like to be able to run in R12 or later, depending
on what the user has installed. The problem is that some OTP APIs have
changed in R13 and R14, making the task not straightforward. Unfortunately
it's not only code that is affected (that would be possible to fix by
checking the actual version), but also hrl files have moved or been created
in the meanwhile. The most acute example is about eunit, where for example
in R13 eunit.hrl moved from eunit/src to eunit/include and the
eunit_listener behaviour was added.

Is there any way to address this in a more reasonable way than duplicating
the affected module and fiddling with the code path at load time?

best regards,
Vlad


More information about the erlang-questions mailing list