Allan, the best way to do this is to use config. Take a look at the application module for more details. A config file, which contains an erlang prop list, can be supplied via the -config option to erl. The application module is how you would access it.
Thought I'd ask the group a beginner question. I'm starting my first "real" project using Erlang.
Part of the project involves importing some data from text files into a database. I have a property list that contains, for each different file type, the expected fields that should be in the "header" (first line) of the file. So I have a function that looks like this:
To handle new formats, I pretty much just need to add the expected fields to this list. What's a good way to do that so that the program does not need to be recompiled? I was thinking of using an ets table that I load either in program initialization or lazy-style on the first call to the function. Is this the right approach?