[Dancer-users] bug in "dancer" (was Re: How to un-prettify JSON?)
Mr. Puneet Kishor
punk.kish at gmail.com
Wed Mar 16 06:28:51 CET 2011
On Mar 14, 2011, at 3:29 PM, franck wrote:
>
> > could you try to set PLACK_ENV to development inside your apache configuration (if you're using plack of course)
> >
>
> Sorry, I am not using plack.
>
>
> ok, so there is an issue somewhere else :/
>
> will try to reproduce the issue.
Figured it out. I believe since 1.30xx onward, we have the following in dispatch.cgi
----
#!/usr/local/bin/perl
use Dancer ':syntax';
use FindBin '$RealBin';
use Plack::Runner;
# For some reason Apache SetEnv directives dont propagate
# correctly to the dispatchers, so forcing PSGI and env here
# is safer.
set apphandler => 'PSGI';
*** set environment => 'production';
----
The line marked with *** sets the default environment to "production". This is coming from the "dancer -a" bootstrapping program which writes out "dispatch.cgi" around line 596.
This line was forcing my app to always be in production, ignoring any other settings, for example, the settings in my apache conf file.
Puneet.
More information about the Dancer-users
mailing list