[erlang-questions] ct:require and ct:get_config

JD Bothma <>
Fri Oct 19 16:53:49 CEST 2012

I was looking at R15B02 docs while looking at B01 code. The respective
code and docs versions agree with each other.

Thanks for pointing out that you'd already implemented the desired
behaviour in B02, Lukas. It's awesome!

On 19 October 2012 13:31, JD Bothma <> wrote:
> It looks like a clause is missing or documented incorrectly for common
> test external config:
> It says you can require and get config paths up to 3-tuples like
> require(Required)...
> where Required = Key | {Key, SubKeys} | {Key, SubKey, SubKeys}
> but in R15B01, only 2-tuples are implemented (ct_config):
> require(Key) when is_atom(Key) ->
>     require({Key,[]});
> require({Key,SubKeys}) when is_atom(Key) ->
>     allocate('_UNDEF',Key,to_list(SubKeys));
> require(Key) ->
>     {error,{invalid,Key}}.
> Is there a specific reason for stopping at 2? Would a patch to fix the
> documentation or to fix ct_config be preferred? If the latter, any
> reason for not recursing down arbitrary depth of config tuple trees?

More information about the erlang-questions mailing list