像
这样的东西erl -s crypto start -s application start public_key
适用于加密但不适用于应用程序:start(..)。通常我会调用应用程序主管但不是应用程序本身。通常的做法是什么?
答案 0 :(得分:3)
-s标志需要
模块乐趣Arg1 Arg2 ..
并以
执行模块:fun([Arg1,Arg2,..])。
因此,它将参数作为列表传递。
运行-s application start public_key
时,会调用application:start([public_key])
,但不支持。这有效:application:start(public_key)
如果没有创建包含启动public_key应用程序的函数的模块,我没有找到解决方法,例如:
- 模(MyApp的)。
-export([开始/ 1])。
开始([应用]) - >应用:启动(应用程序)
。
并称之为
erl -s crypto start -s myapp start public_key