sawyer x wrote, On 09/28/2011 01:40 PM:
On Mon, Sep 26, 2011 at 4:40 PM, Assaf Gordon <gordon@cshl.edu <mailto:gordon@cshl.edu>> wrote:
But I've noticed that Dancer (when used with ":script" option) ignores any command line arguments, and so the "environment" can't be set, and so the configuration settings are always loaded from "development.yml".
Have you tried the environment variable for Dancer environments?
From what I understand from the Dancer code (version '1.3079_03'),
The config file is defined as: === sub conffile { path(setting('confdir') || setting('appdir'), 'config.yml') } === And 'appdir' can be changed with DANCER_APPDIR environment variable. But the environment-specific file is defined as: === sub environment_file { my $env = setting('environment'); return path(setting('appdir'), 'environments', "$env.yml"); } === And "setting{'environment'}" can't be set using unix environment variables (at least I couldn't find any reference to that in the code). -gordon