Hiya,
This may be a colossally stupid question. I have a webapp that has many nifty things in config.yml and different settings based on the envirnoment. I'd like to use the Dancer config for cli utilities (a data loader for example) and not have to manually munge together the config.yml and the envinroment/<whatever>.yml. I don't want to use YAML, load the config.yml, find the environment, find the environment config file, load it and merge it with the main config... because Dancer already does that.
Now, something like this works for a script I've got in a "scripts" folder off the root of my Dancer app:
use Data::Dumper::Concise;
set appdir => "$FindBin::Bin/../";
set environment => 'production';
This does it just fine. Granted, it's relatively small but it seems klugy to me. Anyone else done something like this? How do you do it? Is there a better way? Am I utterly blind?
Thanks,
D
aka meraxes