[erlang-questions] passing an include path to escript
Sergey Samokhin
ad.sergey@REDACTED
Fri Jan 22 10:18:57 CET 2010
On Tue, Dec 1, 2009 at 8:37 PM, zabrane Mikael <zabrane3@REDACTED> wrote:
> Hi List !
>
> I'm facing the same issue as "Wojtek" here:
> http://forum.trapexit.org/viewtopic.php?p=48544&sid=d7fe0c082bbea7b130d30713a2925491
>
> Could someone please, show us a clean way to add relative paths to our
> ".hrl"files which are outside "lib_dir"?
Does anybody know, are there any plans on allowing "include" to be
used inside escripts?
I'm writing a small library for parsing CLI arguments. I think
specifications looks much simplier to understand,
if they a list of records:
Specs =
[
#opt{long_name = help,
short_name = h,
type = boolean},
#opt{long_name = version,
short_name = v,
type = boolean,
validator = fun(_Val) -> ok end}
]
than a list of tuples:
Specs =
[{help, [{short_name, h}, {type, boolean}]},
{version, [{short_name, v}, {type, boolean}, {validator,
fun(_Val) -> ok end}]]
Currently the only way to specify which options to get is by using
list of tuples.
--
Sergey
More information about the erlang-questions
mailing list