mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Use erlang:function_exported/3
This commit is contained in:
parent
c6f6e8a572
commit
3356c2d9e8
1 changed files with 2 additions and 2 deletions
|
@ -280,8 +280,8 @@ expand_lib_dirs([Dir | Rest], Root, Acc) ->
|
||||||
select_modules([], _Command, Acc) ->
|
select_modules([], _Command, Acc) ->
|
||||||
lists:reverse(Acc);
|
lists:reverse(Acc);
|
||||||
select_modules([Module | Rest], Command, Acc) ->
|
select_modules([Module | Rest], Command, Acc) ->
|
||||||
Exports = Module:module_info(exports),
|
{module, Module} = code:ensure_loaded(Module),
|
||||||
case lists:member({Command, 2}, Exports) of
|
case erlang:function_exported(Module, Command, 2) of
|
||||||
true ->
|
true ->
|
||||||
select_modules(Rest, Command, [Module | Acc]);
|
select_modules(Rest, Command, [Module | Acc]);
|
||||||
false ->
|
false ->
|
||||||
|
|
Loading…
Reference in a new issue