Search code examples
erlangejabberd

What is -pa and -pz in erlang?


I was trying to modify mod_log_chat module in ejabberd-contrib where I saw the following command in build.sh

erl -pa ../ejabberd-dev/ebin -pz ebin -make

Can someone explain what is -pa and -pz? I am not getting a satisfactory information from web.


Solution

  • From: http://erlang.org/doc/man/code.html

    In interactive mode, the code server maintains a search path -- usually called the code path -- consisting of a list of directories, which it searches sequentially when trying to load a module.

    From: http://erlang.org/doc/man/erl.html

    -pa Dir1 Dir2

    Adds the specified directories to the beginning of the code path, similar to code:add_pathsa/1.

    -pz Dir1 Dir2

    Adds the specified directories to the end of the code path, similar to code:add_pathsz/1.