I am going to guess I am missing something obvious you are trying to do, but why can't you do this:
myapp:
token: 42
in any config file in your Dancer2 application? I'll do this in config.yml if I have settings across all environments, in config_local.yml for settings I don't add to version control, and in my environment yaml files when such settings are environment specific. Put that in any config file and you can simply use config->{ myapp }{ url }, etc. in your Dancer2 app.
I feel like I am missing what you are trying to do somehow. Let me know.
Jason
On Mon, Feb 8, 2021, at 4:00 PM, Gabor Szabo wrote:
e.g. My applications uses some external system and I'd like to read its URL and the token I need to access it from some config file.
I looked at the generated config files, and the only solution I could come up with is to put it under "plugins" like this:
token: 42
I don't really like it.
What is the recommended way to do it?
Gabor
_______________________________________________
dancer-users mailing list
--
Jason A. Crome / CromeDome
_______________________________________________