My preference should be to set the environment in the Makefile.PL only when I do "make test".
It's better that doing this everywhere.

I will try to look in the Dancer core code to try to find how Dancer use this env. Because it only work when I can bin/app.pl,

I think perhaps I need to use Dancer::Config first, not so sure, I take a look.


Le 27 mars 2011 à 19:00, sawyer x a écrit :


On Sun, Mar 27, 2011 at 6:56 PM, Geistteufel <geistteufel@yahoo.fr> wrote:
Well, in fact DANCER_ENVIRONMENT is not use with Dancer::Test;

2011/3/27 Geistteufel <geistteufel@yahoo.fr>:
> Hi, I want to switch to "testing" environment when I call "make test".

If Dancer::Test does not respect DANCER_ENVIRONMENT, it'd be best to open an issue regarding that.

You can always do set environment => 'mine'; in the testing code.