list_to_existing_atom(String) -> atom()
Types:
Returns the atom whose text representation is String, but only if there already exists such atom.
Failure: badarg if there does not already exist an atom whose text representation is String.
Hi,
I think that the modules defining the atoms must be loaded when you call to_existing_atom.
Can you preloaded those?
Regards, vlad
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Is there more information available ?
Thanks
.Floris
_______________________________________________
> Question: What should I do to force the atoms from my dependent apps to be loaded? I've been manually calling Module:module_info/0 just in time but, alas, this is starting to fail due to other module dependencies that are unknown at my call sites.
Eric,
I presume you have a proper boot script?
If you start the system with the command-line option 'mode -embedded', all modules will be loaded at boot time.
This also turns off dynamic code loading - no free lunch here. You can still explicitly load modules, but unfortunately (?), it's not possible to tell the code_server to go from embedded to 'interactive' mode.
BR,
Ulf W
Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com
I often do this and make the getters/setters convert atoms to binary
so that I can still avoid typing the <<" and ">> as much as possible.
Of course, this won't help if you are pattern matching.
jack.
| rhar...@google.com
Envoyé par : erlang-quest...@erlang.org 18/11/2011 15:52 |
|