element (2, application:get_key (drurly, modules))
returns the old list of modules, i.e., is missing new modules. ct_expand to the rescue! I get the list of modules at compile time from the application specification via
Modules =
ct_expand:term (
begin
{ ok, [ { application, drurly, PropList } ] } =
file:consult ("drurly.app"),
case proplists:get_value (modules, PropList) of
Y when is_list (Y) -> Y
end
end
),
For this to work, you must ensure the application specification is generated prior to compiling the module with this function in it.
No comments:
Post a Comment