[erlang-questions] compile module from string, containing macro definitions

Chris Newcombe chris.newcombe@REDACTED
Fri Mar 9 01:11:13 CET 2007

> Does anybody know how to get compile:forms to process -include
> directives, or if I need to do it myself as a pre-pass?

To answer my own question, a glance at epp.erl shows that include
files are handled there.  So I guess I'll have to duplicate the

It's a shame that the preprocessor & compiler are almost-but-not-quite
packaged in a way that makes them usable from within applications.

In my case, I'm building a web-service, and as an
administration/support tool I'm providint a REST API to accept some
POSTed code, compile it, load it on all nodes (incase it calls funs on
remote nodes), and execute it.

Basically I want a scriptable version of a remote-shell.   It's
clearly a tremendously powerful way to get visibility into, and
control over, a live system (with appropriate care over security).
Remote-shells are a wonderful tool, but too painful if there are lots
of nodes.

I'm suprised that this doesn't seem to be a common pattern.


More information about the erlang-questions mailing list