Hi all,<br><br>Is it considered bad practice to use application environment variables (i.e. application:get_env/2,3) in workers, as opposed to only passing config information via the start()/init() calls? I am finding it tedious as I add more configuration data to the sys.config file, to get_env() the data in a supervisor and then parcel it out to the workers. Also, it becomes a pain to change the values at runtime, whereas if I put a function like this in an affected worker<br>
<br>my_foo_val() -><br> application:get_env(my_app, my_foo_val, ?SOME_SANE_DEFAULT).<br><br>then runtime changes can be made immediately using set_env(), and it becomes much easier to add new config data, but I feel uneasy, almost as if I'm using global variables. From a load point of view, I only do this in places where the value is not used at a high rate.<br>
<br>What is the preferred or recommended (or even most common) practice?<br><br>Regards,<br>Edwin Fine<br>