15 Nov
2011
15 Nov
'11
10:44 a.m.
On Tuesday 15 November 2011 10:42:21 David Precious wrote:
In the meantime, you could store your database settings in a separate YAML file, then in your apps, load that and put it into the app's config with something a little like:
my $db_conf = YAML::LoadFile('database.yml'); config->{plugins}{Database} = $db_conf;
That should work :)
And of course that could be even more concise using the from_yaml() keyword provided by Dancer, e.g.: config->{plugins}{Database} = from_yaml('database.yml'); -- David Precious ("bigpresh") http://www.preshweb.co.uk/ "Programming is like sex. One mistake and you have to support it for the rest of your life". (Michael Sinz)