setting confdir and environments problem
I've been checking out Dancer and the flexibility of reorganizing the directory structure of an app is great; however, I'm not sure I'm doing it right for confdir. I have an app named Alpha-Beta. If I do $ export DANCER_CONFDIR=/Users/ted/tmp/tmp/Alpha-Beta/etc $ bin/app.pl then the file /Users/ted/tmp/tmp/Alpha-Beta/etc/config.yml is found but the file /Users/ted/tmp/tmp/Alpha-Beta/etc/environments/development.yml is not found. When I look in Dancer/Config.pm I see the following code sub environment_file { my $env = setting('environment'); return path(setting('appdir'), 'environments', "$env.yml"); } Should it be the following? sub environment_file { my $env = setting('environment'); return path(setting('confdir') || setting('appdir'), 'environments', "$env.yml"); } Thanks. Ted
On 28 April 2011 06:44, Ted Henry <tedhenry10@gmail.com> wrote:
I've been checking out Dancer and the flexibility of reorganizing the directory structure of an app is great; however, I'm not sure I'm doing it right for confdir.
I have an app named Alpha-Beta. If I do
$ export DANCER_CONFDIR=/Users/ted/tmp/tmp/Alpha-Beta/etc $ bin/app.pl
then the file /Users/ted/tmp/tmp/Alpha-Beta/etc/config.yml is found but the file /Users/ted/tmp/tmp/Alpha-Beta/etc/environments/development.yml is not found.
When I look in Dancer/Config.pm I see the following code
sub environment_file { my $env = setting('environment'); return path(setting('appdir'), 'environments', "$env.yml"); }
Should it be the following?
sub environment_file { my $env = setting('environment'); return path(setting('confdir') || setting('appdir'), 'environments', "$env.yml"); }
DANCER_CONFDIR just defines where config.yml is located. In config.yml you can specify your appdir: appdir: "/Users/ted/tmp/tmp/Alpha-Beta/etc" Then Dancer will find your environment files under [appdir]/environments/
This answer implies that there's no way to store your environment configuration separate from your appdir right? On Thu, Apr 28, 2011 at 9:11 AM, Al <calyx2011@gmail.com> wrote:
On 28 April 2011 06:44, Ted Henry <tedhenry10@gmail.com> wrote:
I've been checking out Dancer and the flexibility of reorganizing the directory structure of an app is great; however, I'm not sure I'm doing it right for confdir.
I have an app named Alpha-Beta. If I do
$ export DANCER_CONFDIR=/Users/ted/tmp/tmp/Alpha-Beta/etc $ bin/app.pl
then the file /Users/ted/tmp/tmp/Alpha-Beta/etc/config.yml is found but the file /Users/ted/tmp/tmp/Alpha-Beta/etc/environments/development.yml is not found.
When I look in Dancer/Config.pm I see the following code
sub environment_file { my $env = setting('environment'); return path(setting('appdir'), 'environments', "$env.yml"); }
Should it be the following?
sub environment_file { my $env = setting('environment'); return path(setting('confdir') || setting('appdir'), 'environments', "$env.yml"); }
DANCER_CONFDIR just defines where config.yml is located. In config.yml you can specify your appdir:
appdir: "/Users/ted/tmp/tmp/Alpha-Beta/etc"
Then Dancer will find your environment files under [appdir]/environments/ _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
[order restored] On Thu, Apr 28, 2011 at 9:36 AM, Brian E. Lozier <brian@massassi.com> wrote:
On Thu, Apr 28, 2011 at 9:11 AM, Al <calyx2011@gmail.com> wrote:
On 28 April 2011 06:44, Ted Henry <tedhenry10@gmail.com> wrote:
I've been checking out Dancer and the flexibility of reorganizing the directory structure of an app is great; however, I'm not sure I'm doing it right for confdir.
I have an app named Alpha-Beta. If I do
$ export DANCER_CONFDIR=/Users/ted/tmp/tmp/Alpha-Beta/etc $ bin/app.pl
then the file /Users/ted/tmp/tmp/Alpha-Beta/etc/config.yml is found but the file /Users/ted/tmp/tmp/Alpha-Beta/etc/environments/development.yml is not found.
When I look in Dancer/Config.pm I see the following code
sub environment_file { my $env = setting('environment'); return path(setting('appdir'), 'environments', "$env.yml"); }
Should it be the following?
sub environment_file { my $env = setting('environment'); return path(setting('confdir') || setting('appdir'), 'environments', "$env.yml"); }
DANCER_CONFDIR just defines where config.yml is located. In config.yml you can specify your appdir:
appdir: "/Users/ted/tmp/tmp/Alpha-Beta/etc"
Then Dancer will find your environment files under [appdir]/environments/
This answer implies that there's no way to store your environment configuration separate from your appdir right?
I think that is true which is unfortunate. I'd like to be able to store the environment configuration in a directory that is not appdir/environments/. It would seem something called CONFDIR would be specifying where all configuration files live. Ted
That's right (from looking in Dancer::Config::environment_file ). On 28 April 2011 17:36, Brian E. Lozier <brian@massassi.com> wrote:
This answer implies that there's no way to store your environment configuration separate from your appdir right?
On Thu, Apr 28, 2011 at 9:11 AM, Al <calyx2011@gmail.com> wrote:
On 28 April 2011 06:44, Ted Henry <tedhenry10@gmail.com> wrote:
I've been checking out Dancer and the flexibility of reorganizing the directory structure of an app is great; however, I'm not sure I'm doing it right for confdir.
I have an app named Alpha-Beta. If I do
$ export DANCER_CONFDIR=/Users/ted/tmp/tmp/Alpha-Beta/etc $ bin/app.pl
then the file /Users/ted/tmp/tmp/Alpha-Beta/etc/config.yml is found but the file /Users/ted/tmp/tmp/Alpha-Beta/etc/environments/development.yml is not found.
When I look in Dancer/Config.pm I see the following code
sub environment_file { my $env = setting('environment'); return path(setting('appdir'), 'environments', "$env.yml"); }
Should it be the following?
sub environment_file { my $env = setting('environment'); return path(setting('confdir') || setting('appdir'), 'environments', "$env.yml"); }
DANCER_CONFDIR just defines where config.yml is located. In config.yml you can specify your appdir:
appdir: "/Users/ted/tmp/tmp/Alpha-Beta/etc"
Then Dancer will find your environment files under [appdir]/environments/ _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
Hey Ted On Thu, Apr 28, 2011 at 7:44 AM, Ted Henry <tedhenry10@gmail.com> wrote:
I've been checking out Dancer and the flexibility of reorganizing the directory structure of an app is great; however, I'm not sure I'm doing it right for confdir.
I have an app named Alpha-Beta. If I do
$ export DANCER_CONFDIR=/Users/ted/tmp/tmp/Alpha-Beta/etc $ bin/app.pl
then the file /Users/ted/tmp/tmp/Alpha-Beta/etc/config.yml is found but the file /Users/ted/tmp/tmp/Alpha-Beta/etc/environments/development.yml is not found.
When I look in Dancer/Config.pm I see the following code
sub environment_file { my $env = setting('environment'); return path(setting('appdir'), 'environments', "$env.yml"); }
Should it be the following?
sub environment_file { my $env = setting('environment'); return path(setting('confdir') || setting('appdir'), 'environments', "$env.yml"); }
Thanks.
Can you open an issue on github (https://github.com/sukria/Dancer/issues/) ? I It's easier for us to track and discuss this kind of problem. Thanks :)
Ted _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
-- franck cuny http://lumberjaph.net - http://github.com/franckcuny
participants (4)
-
Al -
Brian E. Lozier -
franck -
Ted Henry