[dancer-users] Changing paths for testing purpose

Cymon cymon.ML at gmail.com
Sat Mar 8 18:08:22 GMT 2014


Il giorno Mon, 03 Mar 2014 17:45:55 -0700
Warren Young <warren at etr-usa.com> ha scritto:

> On 3/3/2014 17:39, Cymon wrote:
> >      $ENV{DANCER_VIEWS} = "views";
> 
> You can set that in the config.yml file, which you should already
> have if you used the "dancer" helper app to create your application
> shell:
> 
>      views: "../views"
> 
> or whatever.

Hi,
thank you for the advice! It worked!

Problem is that first time I tried to put this configuration directly
in the Test::TCP server configuration

   server => sub {
        my $port = shift;
        use Dancer2;
        set(show_errors  => 1,
            startup_info => 1,
            port         => $port,
            logger       => 'capture',
            log          => 'debug',
            views        => '../../views'
        );
        Dancer2->runner->server->port($port);
        start;
    },

but it didn't work so I had to put it directly in the config.yml.

It seems that no configuration written as a set in the server of
Test::TCP is correctly used. Does someone know why? 
Where should I put configurations good only for tests that I don't want
in config.yml?






-- 
Cymon
http://perlishscrewdriver.blogspot.it/


More information about the dancer-users mailing list